forked from nuxt-community/auth-module
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: improve module (nuxt-community#922)
* demo: use type `NuxtConfig` in `nuxt.config.ts` * feat: improve types * feat(schemes): set constructor types * refactor: rename contract `PartialOptions` to `SchemePartialOptions` * feat(providers): add contracts `ProviderOptions` and `ProviderPartialOptions` * feat(sanctum provider): improve types * chore: fix lint * refactor(sanctum provider): reorder extends * fix(provider): fix type `ProviderPartialOptions` * fix(schemes): `property` and `data` of `refreshToken` should accept `false` * fix(schemes): fix types of `scope` and `endpoints` * feat(jwt provider): improve types * feat(passport provider): improve types * refactor(sanctum provider): use `typeof strategy` for `DEFAULTS` type * feat(github provider): improve types * feat(facebook provider): improve types * feat(google provider): improve types * feat(auth0 provider): improve types * feat(module): improve types * chore(eslint): use recommended typescript rules * feat(schemes): improve types * feat(schemes): use `protected` and `private` modifiers * fix(schemes): return type of logout should be `Promise<void> | void` * fix(oauth2 scheme): return type of logout should be `void` * feat(providers): improve types * feat(inc): improve types * feat(inc): use `private` modifiers * fix(types): add plugins option to type `ModuleOptions` * feat(types): improve option types of `ModuleOptions` * feat(module): improve types * fix(oauth2 scheme): use `+ ''` instead of `toString()` * test: fix method names * fix(token, refresh token): use type `string | boolean` * feat(utils): improve types * fix(types): add `ignoreExceptions` option to type `ModuleOptions` * fix(scheme): fix type `Scheme` * fix(scheme): fix type `RefreshableScheme` * fix(refresh scheme): fix type of `setUserToken` params * fix(core): fix property `tokenName` in `requestWith` * fix(local scheme): fix return type of `mounted` * fix(utils): fix types * fix(inc): fix types * feat(core): improve types * chore(tsconfig): enable `resolveJsonModule` * chore(eslint): fix extends order * chore(dev-deps): add `vue` and `@types/lodash.get` * chore(dev-deps): add @types/cookie-parser, @types/express-jwt, and @types/jsonwebtoken * demo: improve types * demo: update tsconfig * chore: update tsconfig * chore(scripts): use `import` instead of `require` * fix(schemes): fix return type of `mounted` * fix(utils): fix type of `encodeQuery` * fix(local scheme): fix type of `login` endpoint in `LocalSchemeOptions` * fix(providers): add `clientSecret` to type `ProviderOptions` * feat(utils): improve types of provider utilities * demo: update tsconfig * demo: use `nuxt/components` * demo: fix auth options * demo(api): fix export default * fix(module): set default value of `ignoreExceptions` to `false` * test: improve types * test: update tsconfig * chore(jest): use `tsconfig` instead of `tsConfig` The option `tsConfig` is deprecated and will be removed in ts-jest 27, use `tsconfig` instead. * chore(jest): ignore fixture * demo: convert api and store files back to js * chore(eslint): ignore test/fixture * fix: add `_` prefix to private methods * refactor(providers): move contracts to index.ts * refactor(schemes): move contracts to index.ts * refactor(schemes): export scheme options directly in scheme file * feat: export scheme and provider types at top level * chore(tsconfig): set `baseUrl` * chore(dev-deps): use `latest` version * refactor: simplify types, update structure and use named exports * refactor: type leftovers * refactor: simplify and apply prettier rules * refactor: update module and demo * chore: show error trace in demo * feat: throw better errors for invalid strategy * fix typo in template * update demo * chore: fix lint errors * fix custom scheme imports * test: use @nuxt/test-utils * feat(pkg): use siroc * fix: resolve rescursive types * update top level index.d * fix getProp * update ci * remove dependency on nanoid and jwt-decode named exports * fix demo types * revert demo to custom vps because of sticky sessions Co-authored-by: Pooya Parsa <[email protected]>
- Loading branch information
1 parent
df8f01e
commit 3f950ac
Showing
79 changed files
with
2,611 additions
and
1,524 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ node_modules | |
.nuxt | ||
dist | ||
docs/static/sw.js | ||
test/fixture |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,7 @@ jobs: | |
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
node: [10] | ||
node: [14] | ||
fail-fast: true | ||
|
||
steps: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,4 +9,3 @@ coverage | |
dist | ||
package-lock.json | ||
_book | ||
types |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.