Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
6cc79b4
refactor: typescript minimum valuable product
fratzinger Jan 21, 2021
afbc18a
refactor: move to typescript
fratzinger Jan 23, 2021
fed500b
test: add typings to tests and fix some bugs
fratzinger Jan 24, 2021
b3d8ace
refactor: start seperate services
fratzinger Jan 24, 2021
c41c1ac
test: make nyc report working again
fratzinger Jan 24, 2021
42af819
refactor: move to seperate services
fratzinger Jan 24, 2021
89b619c
docs: add description to service calls
fratzinger Jan 24, 2021
ae73b80
refactor: add better IDE-support
fratzinger Jan 24, 2021
67fe73f
docs: init vuepress
fratzinger Jan 26, 2021
1d0830a
refactor: remove `field` parameter
fratzinger Jan 26, 2021
2a4eed3
feat: separate services
fratzinger Feb 21, 2021
d1eb491
modify client authenticate
fratzinger Feb 21, 2021
670413c
docs: add hooks docs
fratzinger Feb 21, 2021
575bb26
small changes
fratzinger Feb 21, 2021
fbd41ac
several improvements
fratzinger Feb 22, 2021
1a81f71
small changes
fratzinger Feb 23, 2021
013918f
docs: improvements
fratzinger Feb 23, 2021
dd0225b
docs: add example
fratzinger Mar 1, 2021
2607f37
chore: rename folder "service" to "services"
fratzinger Apr 17, 2021
9946421
docs: continue docs
fratzinger Apr 17, 2021
90ef05f
feat: prepare for custom methods from feathers^5
fratzinger Apr 17, 2021
a148e2a
chore: expose services at root
fratzinger Apr 17, 2021
f93befa
docs(chore): move vuepress to vitepress
fratzinger Apr 18, 2021
83104dc
refactor: move methods to seperate folder
fratzinger Apr 18, 2021
6257360
docs: align with PR from rma4ok
fratzinger Apr 18, 2021
12c9cad
Merge remote-tracking branch 'upstream/master'
fratzinger Apr 18, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# don't ever lint node_modules
node_modules
# don't lint build output (make sure it's set to your correct build folder name)
dist
# don't lint nyc coverage output
coverage

test/
33 changes: 33 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
module.exports = {
root: true,
env: {
node: true,
mocha: true
},
parser: '@typescript-eslint/parser',
parserOptions: {
project: 'tsconfig.json'
},
plugins: [
'@typescript-eslint'
],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'standard-with-typescript'
],
rules: {
semi: ['warn', 'always'],
'@typescript-eslint/semi': ['warn', 'always'],
'@typescript-eslint/strict-boolean-expressions': ['off'],
'spaced-comment': ['off']
},
overrides: [
{
files: ['test/**/*.ts'],
rules: {
'@typescript-eslint/ban-ts-comment': ['off']
}
}
]
};
29 changes: 29 additions & 0 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# This workflow will do a clean install of node dependencies, run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Node.js CI

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
test:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [10.x, 12.x, 14.x, 15.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm test
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,10 @@ node_modules

# The compiled/babelified modules
lib/
dist/

## editor
.idea/

.vscode/
.prettierrc
#.vscode/
.prettierrc
12 changes: 12 additions & 0 deletions .mocharc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
'use strict';
const path = require("path");

module.exports = {
extension: ["ts", "js"],
package: path.join(__dirname, "./package.json"),
ui: "bdd",
spec: [
"./test/**/*.test.*",
],
exit: true
};
14 changes: 12 additions & 2 deletions .nycrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
{
"all": true,
"include": ["src/**/*.js"],
"include": [
"src/**/*.js",
"src/**/*.ts"
],
"exclude": [
"coverage/**",
"node_modules/**",
"**/*.d.ts",
"**/*.test.ts"
],
"sourceMap": true,
"reporter": ["text", "html", "lcov"]
}
}
32 changes: 32 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"version": "0.2.0",
"configurations": [
{
"type": "pwa-node",
"resolveSourceMapLocations": [
"${workspaceFolder}/**",
"!**/node_modules/**"
],
"request": "launch",
"name": "Mocha Tests",
"program": "${workspaceFolder}/node_modules/mocha/bin/mocha",
"args": [
"--require",
"ts-node/register",
"--timeout",
"999999",
"--colors",
"--recursive"
],
"internalConsoleOptions": "openOnSessionStart",
"env": {
"NODE_ENV": "test",
"TS_NODE_PROJECT": "tsconfig.test.json"
},
"outputCapture": "std",
"skipFiles": [
"<node_internals>/**"
]
},
]
}
14 changes: 14 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// Place your settings in this file to overwrite default and user settings.
{
"search.exclude": {
"**/node_modules": true,
"**/public": true,
"**/package-lock.json": true,
"**/yarn.lock": true
},
"workbench.colorCustomizations": {
"activityBar.background": "#520064",
"titleBar.activeBackground": "#520064",
"titleBar.activeForeground": "#FAFBF4"
}
}
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2016 Feathers
Copyright (c) 2021 Feathers

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
44 changes: 26 additions & 18 deletions docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,23 +82,31 @@ Leaving it a pure API server, lets it be used with both native and browser clien

## Contents

- [The Service](#service)
- [Client](#client)
- [Using Feathers' method calls](#using-feathers-method-calls)
- [Provided service wrappers](#provided-service-wrappers)
- [HTTP fetch](#http-fetch)
- [React's redux](#react-redux)
- [Dispatching services](#dispatching-services)
- [Dispatching authentication](#dispatching-authentication)
- [Vue 2.0 (docs to do)](#vue)
- [Hooks](#hooks)
- [Multiple services](#multiple-services)
- [Database](#database)
- [Routing](#routing)
- [Security](#security)
- [Docs](#docs)
- [Configurable](#configurable)
- [Tests](#tests)
- [feathers-authentication-management](#feathers-authentication-management)
- [Multiple communication channels:](#multiple-communication-channels)
- [Capabilities:](#capabilities)
- [User notifications may be sent for:](#user-notifications-may-be-sent-for)
- [May be used with](#may-be-used-with)
- [Contents](#contents)
- [Service](#service)
- [Client](#client)
- [Using Feathers method calls](#using-feathers-method-calls)
- [Provided service wrappers](#provided-service-wrappers)
- [HTTP fetch](#http-fetch)
- [React Redux](#react-redux)
- [Dispatching services](#dispatching-services)
- [Dispatching authentication](#dispatching-authentication)
- [Vue](#vue)
- [Hooks](#hooks)
- [`verifyHooks.addVerification( path = 'authManagement' )`](#verifyhooksaddverification-path--authmanagement-)
- [`verifyHooks.isVerified()`](#verifyhooksisverified)
- [Multiple services](#multiple-services)
- [Database](#database)
- [Routing](#routing)
- [Security](#security)
- [Docs](#docs)
- [Configurable](#configurable)
- [Tests](#tests)

## Service

Expand Down Expand Up @@ -497,7 +505,7 @@ You should add them to your user model if your database uses models.
resetToken: { type: String },
resetShortToken: { type: String },
resetExpires: { type: Date }, // or a long integer
resetAttempts: { type: Number },
resetAttempts: { type: Number }
}
```

Expand Down
23 changes: 23 additions & 0 deletions docs/.vitepress/config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
module.exports = {
title: 'feathers-authentication-management',
description: 'Sign up verification, forgotten password reset, and other capabilities for local authentication',
themeConfig: {
repo: 'feathersjs-ecosystem/feathers-authentication-management',
editLinks: true,
editLinkText: 'Edit this page on GitHub',
lastUpdated: 'Last Updated',
sidebarDepth: 1,
displayAllHeaders: true,
sidebar: {
'/': [
{ text: 'Overview', link: '/overview' },
{ text: 'Getting Started', link: '/getting-started' },
{ text: 'Basic Usage', link: '/basic' },
{ text: 'Services', link: '/services' },
{ text: 'Hooks', link: "/hooks" },
{ text: "Client", link: "/client" },
{ text: "Advanced Usage", link: "/advanced" }
]
},
}
}
20 changes: 20 additions & 0 deletions docs/.vitepress/style.styl
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// colors
$accentColor = #520064
$textColor = #2c3e50
$borderColor = #eaecef
$codeBgColor = #282c34
$arrowBgColor = #ccc
$badgeTipColor = #520064
$badgeWarningColor = darken(#ffe564, 35%)
$badgeErrorColor = #DA5961

// layout
$navbarHeight = 3.6rem
$sidebarWidth = 20rem
$contentWidth = 960px
$homePageWidth = 960px

// responsive breakpoints
$MQNarrow = 959px
$MQMobile = 719px
$MQMobileNarrow = 419px
Loading