Skip to content

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

Merged
merged 13 commits into from
Jul 15, 2020
Merged

Conversation

sam-gc
Copy link
Contributor

@sam-gc sam-gc commented Jul 15, 2020

No description provided.

@changeset-bot
Copy link

changeset-bot bot commented Jul 15, 2020

💥 No Changeset

Latest 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 changesets

When 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

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Jul 15, 2020

Binary Size Report

Affected SDKs

No changes between base commit (d59ed26) and head commit (95b2c42).

Test Logs

Copy link
Contributor

@avolkovi avolkovi left a 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(
Copy link
Contributor

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?

Copy link
Contributor Author

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

@sam-gc sam-gc force-pushed the samgho/auth_redirect_persistence branch from aae8964 to aeb2875 Compare July 15, 2020 18:19
@sam-gc sam-gc changed the base branch from samgho/event_manager_redirect to auth-next July 15, 2020 18:20
return this.reloadAndSetCurrentUserOrClear(storedUser);
}

assert(popupRedirectResolver, this.name, AuthErrorCode.ARGUMENT_ERROR);
Copy link
Contributor

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

Copy link
Contributor Author

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 😬

@sam-gc sam-gc merged commit 4aa4e24 into auth-next Jul 15, 2020
avolkovi pushed a commit that referenced this pull request Aug 6, 2020
* 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
avolkovi pushed a commit that referenced this pull request Aug 10, 2020
* 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
@firebase firebase locked and limited conversation to collaborators Aug 15, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants