Commit a5fb640
feat!: Next breaking change (#266)
* Usercontext change (#246)
* Add logic to use Session recipe with JWTs
* Change recipeImplementation functions to normal javascript functions
* Change recipeImplementation function format
* Add config tests
* Add binds when calling originalImplementation functions
* Change recipeImplementation to be a function that returns recipe interface
* Refactor
* Add binds to recipe implementation, adds override tests
* Add some unit tests
* Update logic for Session with JWT implementation
* Add new session class for using Session recipe with JWT recipe, and update recipe implementation to use new session class where required
* Refactor based on PR review
* Make JWT recipe in Session recipe class def optional
* Refactor based on PR review
* Allow custom key for jwt in access token payload
* Update package version
* Update CHANGELOG
* Export JWT functions from SessionWrapper export
* Refactor to use jsonwebtoken
* Add iss claim to jwt payload when creating a session
* Refactor config
* Update package version
* Update session class to use arrow functions
* Refactor based on PR comments
* Add tests for sub and iss claims
* Add tests
* Add getPropertyNameFromAccessTokenPayload to config to allow users to handle changing jwt property name overtime
* Add tests
* Update session class
* Update session class
* Refactor based on PR comments
* Refactor based on PR comments
* Add code comments
* Add tests
* Refactor update access token payload logic for session class
* Add tests for _jwtPName
* Add tests for session class
* Refactor code
* Update tests
* Add querier check to session override tests
* Update session class and recipe implementation logic to use a common function
* Fix sessionClass code
* Refactor function name for adding JWT to access token payload
* adds check for negative jwt expiry when updating it
* Fix logic for update access token payload when the new payload is undefined, and add tests
* Fix logic for update access token payload when the new payload is undefined, and add tests
* Add null check for access token payload when creating a session
* Add playground sample for Session init with jwt
* adds skeleton and types for passwordless
* adds passwordless to with-typescript
* adds API paths in passwordless constants fil
* finishes normalising app
* small change
* makes text message sending function compulsory
* implements validate email ID default function
* implements recipe interface
* implements API interface implementation
* implements API input parsing
* adds logic for sending of email / sms
* adds validation of email and phoneNumber in createCode API
* removes a done todo
* adds helper function to manually create magic links
* exposes manually usable functions from passwordless recipe
* adds preAuthSessionId to magic link as well
* fixes a bug with user type
* removes USER_INPUT_CODE_ALREADY_USED_ERROR as a possible output from createCode recipe function
* uncomments code that are due to bugs in the core
* removes console log
* small change to recipe interface
* resets passwordless recipe between each test
* adds resendCode recipe function test
* removes .only and adds another small test
* more tests
* adds test todos
* adds phone number validation logic based on regex
* Refactor integration test server to allow for configuring session recipe to use JWT conditionally
* Fixes for frontend integration server
* adds more test todos
* small change with recipe interface type
* small types change
* fixes issue with consumeCodePOST API output
* fixes a bug
* adds missing API check
* renames resendCode to createNewCodeForDevice
* changes checking of device info in resend code APi
* adds phone number validation and normilising
* Adds passwordless tests (#225)
* starts consumeCodeAPI tests
* fixs
* fixs
* adds tests
* adds expired userInputCode test
* adds create codeAPI test
* adds createCodeAPI tests with phone
* adds magicURL test
* email existsAPI test
* adds phoneNumberAPI tests
* adds resendCodeAPI test
* adds remaining resendCodeAPI test
* adds missing fields consumeCode API test
* adds check to not run passwordless tests if less than required CDI version
* fixs test
* adds phone contact method config tests
* adds contactMethod email tests
* adds more tests
* adds remaining config tests
* adds basic overriding test
* adds udpateUser test
* adds revokeCode test
* adds remaining recipeFunction tests
* implements feedback
* adds passwordless tests
* fixs test
* fixs function
* removes unnecessary variable
* updates fdi version
* Add open id recipe and change session recipe to use open id instead of jwt directly (#226)
* Add open id recipe
* Refactor existing tests
* Refactor openid recipe config and add tests
* Add api and override tests
* Make cors origin header * for getJWKS and open id discovery endpoints
* Refactor based on PR comments
* Move logic of adding iss claim to open id recipe
* Update tests
* Update logic for default issuer and add test for init with gateway path
* Refactor based on PR comments
* Add null check for payload in open id createJWT
* adds 1.11 as FDI
Co-authored-by: Rishabh <[email protected]>
* adds preAuthSessionId as an input to consumeCode and removes it from the output
* Passwordless test changes (#228)
* fixs some tests
* fixs
* updates CHANGELOG.md
* adds integration tests changes (#229)
Co-authored-by: Rishabh <[email protected]>
* makes userContext part of the input object
* makes changes to all types and to emailpassword recipe
* makes changes to emailverification recipe
* removes unnecessary type param
* removes unnecessary type param
* adds context for jwt and openid recipe as well
* adds userContext everywhere
* fixes a bug
* fixes a bug
* adds basic userContext test
* adds missing context passing
* adds missing userContext
* adds missing userContext
* adds missing userContext
* removes userContext from session container interface
Co-authored-by: Nemi Shah <[email protected]>
Co-authored-by: Rishabh <[email protected]>
Co-authored-by: Joel Coutinho <[email protected]>
* Bump follow-redirects from 1.14.6 to 1.14.7 in /test/auth-react-server (#245)
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.14.6 to 1.14.7.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](follow-redirects/follow-redirects@v1.14.6...v1.14.7)
---
updated-dependencies:
- dependency-name: follow-redirects
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Bump follow-redirects from 1.14.4 to 1.14.7 (#243)
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.14.4 to 1.14.7.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](follow-redirects/follow-redirects@v1.14.4...v1.14.7)
---
updated-dependencies:
- dependency-name: follow-redirects
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Bump next from 11.0.0 to 11.1.3 (#227)
Bumps [next](https://github.com/vercel/next.js) from 11.0.0 to 11.1.3.
- [Release notes](https://github.com/vercel/next.js/releases)
- [Changelog](https://github.com/vercel/next.js/blob/canary/release.js)
- [Commits](vercel/next.js@v11.0.0...v11.1.3)
---
updated-dependencies:
- dependency-name: next
dependency-type: direct:development
...
Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Bump validator from 13.6.0 to 13.7.0 (#206)
Bumps [validator](https://github.com/validatorjs/validator.js) from 13.6.0 to 13.7.0.
- [Release notes](https://github.com/validatorjs/validator.js/releases)
- [Changelog](https://github.com/validatorjs/validator.js/blob/master/CHANGELOG.md)
- [Commits](validatorjs/validator.js@13.6.0...13.7.0)
---
updated-dependencies:
- dependency-name: validator
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* adds user context to session class functions (#255)
* feat: adds user context to session class functions and adds a new recipe interface function to session recipe
Co-authored-by: Rishabh <[email protected]>
* adds missing userContext passing
* exposes regenerateAccessToken to the user via session/index.ts file
* adds user context to social provider definitions too
Co-authored-by: Nemi Shah <[email protected]>
Co-authored-by: Rishabh <[email protected]>
Co-authored-by: Joel Coutinho <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>1 parent d9e47f8 commit a5fb640
File tree
134 files changed
+2119
-9846
lines changed- lib
- build
- recipe
- emailpassword
- api
- emailverification
- api
- jwt
- api
- openid
- api
- passwordless/api
- session
- api
- faunadb
- with-jwt
- thirdpartyemailpassword
- recipeImplementation
- thirdparty
- api
- ts
- recipe
- emailpassword
- api
- emailverification
- api
- jwt
- api
- openid
- api
- passwordless/api
- session
- api
- faunadb
- with-jwt
- thirdpartyemailpassword
- recipeImplementation
- thirdparty
- api
- test
- auth-react-server
- framework
- with-typescript
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
134 files changed
+2119
-9846
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
9 | 20 | | |
10 | 21 | | |
| 22 | + | |
| 23 | + | |
11 | 24 | | |
12 | 25 | | |
13 | 26 | | |
| |||
21 | 34 | | |
22 | 35 | | |
23 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
24 | 43 | | |
25 | 44 | | |
26 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
| 63 | + | |
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
| 61 | + | |
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
| 49 | + | |
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
56 | 59 | | |
57 | 60 | | |
58 | 61 | | |
59 | 62 | | |
60 | 63 | | |
61 | 64 | | |
62 | | - | |
| 65 | + | |
63 | 66 | | |
64 | 67 | | |
65 | 68 | | |
66 | 69 | | |
67 | 70 | | |
68 | 71 | | |
69 | 72 | | |
70 | | - | |
| 73 | + | |
71 | 74 | | |
72 | 75 | | |
73 | 76 | | |
74 | 77 | | |
75 | 78 | | |
76 | | - | |
| 79 | + | |
| 80 | + | |
77 | 81 | | |
78 | 82 | | |
79 | 83 | | |
| |||
82 | 86 | | |
83 | 87 | | |
84 | 88 | | |
85 | | - | |
| 89 | + | |
86 | 90 | | |
87 | 91 | | |
88 | | - | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
89 | 97 | | |
90 | 98 | | |
91 | 99 | | |
92 | | - | |
| 100 | + | |
93 | 101 | | |
94 | 102 | | |
95 | 103 | | |
96 | | - | |
| 104 | + | |
97 | 105 | | |
98 | 106 | | |
99 | 107 | | |
100 | 108 | | |
101 | | - | |
| 109 | + | |
102 | 110 | | |
103 | 111 | | |
| 112 | + | |
104 | 113 | | |
105 | 114 | | |
106 | 115 | | |
107 | 116 | | |
108 | | - | |
| 117 | + | |
109 | 118 | | |
110 | 119 | | |
111 | 120 | | |
112 | | - | |
| 121 | + | |
113 | 122 | | |
114 | 123 | | |
115 | 124 | | |
116 | 125 | | |
117 | | - | |
| 126 | + | |
118 | 127 | | |
119 | 128 | | |
| 129 | + | |
120 | 130 | | |
121 | 131 | | |
122 | 132 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
| 75 | + | |
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
62 | | - | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
63 | 70 | | |
64 | 71 | | |
65 | 72 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | | - | |
| 62 | + | |
63 | 63 | | |
64 | | - | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
65 | 68 | | |
66 | 69 | | |
67 | 70 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
22 | | - | |
| 23 | + | |
| 24 | + | |
23 | 25 | | |
24 | 26 | | |
25 | 27 | | |
| |||
29 | 31 | | |
30 | 32 | | |
31 | 33 | | |
32 | | - | |
33 | | - | |
| 34 | + | |
| 35 | + | |
34 | 36 | | |
35 | | - | |
| 37 | + | |
| 38 | + | |
36 | 39 | | |
37 | 40 | | |
38 | 41 | | |
| |||
44 | 47 | | |
45 | 48 | | |
46 | 49 | | |
47 | | - | |
| 50 | + | |
| 51 | + | |
48 | 52 | | |
49 | 53 | | |
50 | 54 | | |
| |||
58 | 62 | | |
59 | 63 | | |
60 | 64 | | |
| 65 | + | |
61 | 66 | | |
62 | 67 | | |
63 | 68 | | |
64 | 69 | | |
65 | | - | |
| 70 | + | |
| 71 | + | |
66 | 72 | | |
67 | 73 | | |
68 | 74 | | |
| |||
73 | 79 | | |
74 | 80 | | |
75 | 81 | | |
76 | | - | |
| 82 | + | |
| 83 | + | |
77 | 84 | | |
78 | 85 | | |
79 | 86 | | |
80 | 87 | | |
81 | 88 | | |
82 | 89 | | |
83 | 90 | | |
84 | | - | |
| 91 | + | |
85 | 92 | | |
86 | | - | |
| 93 | + | |
| 94 | + | |
87 | 95 | | |
88 | 96 | | |
89 | 97 | | |
90 | 98 | | |
91 | | - | |
| 99 | + | |
| 100 | + | |
92 | 101 | | |
93 | 102 | | |
94 | 103 | | |
| |||
0 commit comments