Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!: add the OAuth2 recipe #115

Merged
merged 24 commits into from
Oct 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
e39849a
feat: add boilerplate for OAuth2 recipe
porcellus Jun 9, 2024
ebba997
feat: fix recipe ids/names and add getLoginChallengeInfo
porcellus Jun 27, 2024
7374dea
fix: self-review fixes
porcellus Jul 7, 2024
d41215e
fix: add export
porcellus Jul 7, 2024
f83912f
refactor: rename OAuth2 to OAuth2Provider
porcellus Jul 28, 2024
d7cc0fe
fix: make the logininfo type match the backend types
porcellus Jul 29, 2024
2a87e5f
feat: add tryLinkingWithSessionUser flag
porcellus Aug 5, 2024
b450dfe
fix: getLoginChallengeInfo api path
anku255 Aug 9, 2024
d6b3642
feat: update types to match node changes
porcellus Aug 18, 2024
b328719
feat: Add logOut function in OAuth2Provider recipe
anku255 Aug 23, 2024
c6650ab
Merge pull request #118 from supertokens/feat/oauth2/logout
porcellus Aug 25, 2024
369d660
feat: add a new function to match latest node
porcellus Sep 25, 2024
c1bc851
feat: make getTenantId take queryParams into account
porcellus Sep 27, 2024
6f944f8
chore: update version numbers and fdis
porcellus Sep 27, 2024
a03b404
fix: fix variable name for shouldTryLinkingWithSessionUser
porcellus Sep 30, 2024
0ec39f9
fix: shouldTryLinkingWithSessionUser
porcellus Sep 30, 2024
84a0923
ci: fix missing shouldTryLinkingWithSessionUser from some requests
porcellus Sep 30, 2024
150b3c3
feat: self-review cleanup
porcellus Oct 2, 2024
91a6cad
docs: move the shouldTryLinkingWithSessionUser doc comment to the app…
porcellus Oct 2, 2024
a22b7f8
refactor: self-review fixes
porcellus Oct 3, 2024
986fc38
Merge branch '0.13' into feat/oauth2/base
porcellus Oct 3, 2024
39ff432
chore: update version numbers
porcellus Oct 3, 2024
1d650ca
chore: update supported fdi version
porcellus Oct 3, 2024
a975730
chore: update size limits
porcellus Oct 3, 2024
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
45 changes: 45 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,51 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [unreleased]

## [0.15.0] - 2024-10-07

- Added the OAuth2Provider recipe

### Breaking changes

- Added a new `shouldTryLinkingToSessionUser` flag to sign in/up related function inputs:
- No action is needed if you are not using MFA/session based account linking.
- If you are implementing MFA:
- Plase set this flag to `false` (or leave as undefined) during first factor sign-ins
- Please set this flag to `true` for secondary factors.
- Please forward this flag to the original implementation in any of your overrides.
- Changed functions:
- `EmailPassword.signIn`, `EmailPassword.signUp`: both override and callable functions
- `ThirdParty.getAuthorisationURLWithQueryParamsAndSetState`: both override and callable function
- `Passwordless`:
- Functions overrides: `consumeCode`, `resendCode`, `createCode`, `setLoginAttemptInfo`, `getLoginAttemptInfo`
- Calling `createCode` and `setLoginAttemptInfo` take this flag as an optional input (it defaults to false)
- Changed the default implementation of `getTenantId` to default to the `tenantId` query parameter (if present) then falling back to the public tenant instead of always defaulting to the public tenant
- We now disable session based account linking in the magic link based flow in passwordless by default
- This is to make it function more consistently instead of only working if the link was opened on the same device
- You can override by overriding the `consumeCode` function in the Passwordless Recipe (see in the Migration guide section below for more information)

### Migration guide

#### Session based account linking for magic link based flows

You can re-enable linking by overriding the `consumeCode` function in the passwordless recipe and setting `shouldTryLinkingToSessionUser` to `true`.

```ts
Passwordless.init({
override: {
functions: (original) => {
return {
...original,
consumeCode: async (input) => {
// Please note that this is means that the session is required and will cause an error if it is not present
return original.consumeCode({ ...input, shouldTryLinkingWithSessionUser: true });
},
};
},
},
});
```

## [0.13.0] - 2024-07-10

### Breaking Changes
Expand Down
2 changes: 1 addition & 1 deletion bundle/emailpassword.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bundle/emailverification.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bundle/multifactorauth.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bundle/multitenancy.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions bundle/oauth2provider.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bundle/passwordless.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bundle/supertokens.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bundle/thirdparty.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bundle/totp.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bundle/website.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion frontendDriverInterfaceSupported.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"_comment": "contains a list of frontend-backend interface versions that this package supports",
"versions": ["2.0", "3.0"]
"versions": ["4.0"]
}
6 changes: 6 additions & 0 deletions lib/build/recipe/emailpassword/index.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 18 additions & 10 deletions lib/build/recipe/emailpassword/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 14 additions & 2 deletions lib/build/recipe/emailpassword/recipeImplementation.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions lib/build/recipe/emailpassword/types.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion lib/build/recipe/multitenancy/recipeImplementation.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

91 changes: 91 additions & 0 deletions lib/build/recipe/oauth2provider/index.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading