-
Notifications
You must be signed in to change notification settings - Fork 944
Add persistence for redirect users #3410
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
Conversation
💥 No ChangesetLatest commit: 12bc538 Merging this PR will not cause any packages to be released. If these changes should not cause updates to packages in this repo, this is fine 🙂 If these changes should be published to npm, you need to add a changeset. This PR includes no changesetsWhen changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types Click here to learn what changesets are, and how to add one. Click here if you're a maintainer who wants to add a changeset to this PR |
Binary Size ReportAffected SDKsNo changes between base commit (d59ed26) and head commit (95b2c42). Test Logs
|
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.
Let's investigate a bit more to see if there's a way to support redirects without polluting the auth & user object so much...
@@ -76,9 +83,25 @@ export class AuthImpl implements Auth { | |||
persistenceHierarchy | |||
); | |||
|
|||
this.redirectPersistenceManager = await PersistenceUserManager.create( |
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.
is there a way to not have the redirect logic baked into auth? can we do a callback or something with the resolver if it's registered?
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.
(chatted offline)
Uploaded new version
aae8964
to
aeb2875
Compare
return this.reloadAndSetCurrentUserOrClear(storedUser); | ||
} | ||
|
||
assert(popupRedirectResolver, this.name, AuthErrorCode.ARGUMENT_ERROR); |
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.
we may want a more user friendly error here
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.
on the one hand: yes. on the other: this promise is not returned to the user so they'll never see it 😬
* Updates to auth for persistence redirect user * Add tests for persistence * Formatting * Removing erroneous console.logs * Formatting * Updates to the auth init flow * Formatting * Fix typo * Formatting * Rogue console.logwq * Formatting * PR feedback * Formatting
* Updates to auth for persistence redirect user * Add tests for persistence * Formatting * Removing erroneous console.logs * Formatting * Updates to the auth init flow * Formatting * Fix typo * Formatting * Rogue console.logwq * Formatting * PR feedback * Formatting
No description provided.