Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 470
chore(repo): Replace Clerk.user with Clerk.isSignedIn on integration tests #5186
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
Closed
LauraBeatris
wants to merge
15
commits into
laura/orgs-544-sdk-handle-pending-session-status-as-authenticated
from
laura/update-direct-user-access-for-pending
Uh oh!
There was an error while loading. Please reload this page.
Closed
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
35b3500
Add `pending` to `SessionStatus` union
LauraBeatris f370173
Plug pending session into main Client resource
LauraBeatris 479672b
Add test coverage for `pending` and `active` statuses
LauraBeatris 3445ca3
Update handshake tests
LauraBeatris f978659
Update device section to list for pending
LauraBeatris c7d8701
Fix sign in account switcher to look for pending sessions
LauraBeatris 2bc7f70
Consider `pending` as authenticate state for client UAT
LauraBeatris 7eb312c
Save JWT token on Expo for pending session status
LauraBeatris fe3d655
Add `isAuthenticated` property to main Clerk instance
LauraBeatris 265c274
Update `SignIn.SessionList` to include pending sessions
LauraBeatris 8a06daf
Deprecate `activeSessions`
LauraBeatris a5528d7
Add changeset
LauraBeatris aa5eec7
Introduce separate changesets
LauraBeatris add3313
Refactor from `isAuthenticated` to `isSignedIn`
LauraBeatris 8b46b36
Update templates/playgrounds to look for `Clerk.isSignedIn`
LauraBeatris File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| --- | ||
| '@clerk/elements': minor | ||
| '@clerk/shared': minor | ||
| '@clerk/astro': minor | ||
| '@clerk/clerk-react': minor | ||
| '@clerk/types': minor | ||
| '@clerk/clerk-expo': minor | ||
| '@clerk/vue': minor | ||
| --- | ||
| Surface new `pending` session as an signed-in state, similarly as `active` |
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| --- | ||
| '@clerk/clerk-js': minor | ||
| --- | ||
| - Initialize new `pending` session status as an signed-in state | ||
| - Add new `Clerk.isSignedIn` property to provide a more explicit way to check authentication status, replacing the previous `Clerk.user` check | ||
| ```diff | ||
| - if (Clerk.user) { | ||
| + if (Clerk.isSignedIn) { | ||
| // Mount user button component | ||
| document.getElementById('signed-in').innerHTML = ` | ||
| <div id="user-button"></div> | ||
| ` | ||
| const userbuttonDiv = document.getElementById('user-button') | ||
| clerk.mountUserButton(userbuttonDiv) | ||
| } else { | ||
| // ... | ||
| } | ||
| ``` |
This file contains hidden or 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 hidden or 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 hidden or 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.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For applications that don't have pending sessions, checking Clerk.user will still be the same as Clerk.isSignedIn, correct ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct! We'll start replacing
Clerk.userfor custom flow branches of logic to keep it scalable for both active/pending - the following will be applied to our docs especially