feat: open explorer via deep link after social login#374
Open
LautaroPetaccio wants to merge 1 commit into
Open
feat: open explorer via deep link after social login#374LautaroPetaccio wants to merge 1 commit into
LautaroPetaccio wants to merge 1 commit into
Conversation
When OPEN_EXPLORER_AFTER_LOGIN feature flag is enabled and no explicit redirectTo URL is set, navigate to /open-explorer after OAuth callback. The new page posts the identity to the auth server, runs a countdown, and launches a decentraland:// deep link to open the explorer app.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
5 tasks
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
When a user logs in via an OAuth provider (Google, Discord, etc.) and returns to
/auth/callback, they currently get redirected to theredirectToURL. When no explicit redirect destination is set and theOPEN_EXPLORER_AFTER_LOGINfeature flag (dapps-open-explorer-after-login) is enabled, the callback now navigates to a new/auth/open-explorerpage that posts the identity to the auth server and opens the explorer via a deep link.How it works
CallbackPage changes
After successful login in
handleContinue, checks whetherOPEN_EXPLORER_AFTER_LOGINis enabled and no explicitredirectTopath was provided (pathname is/). If both conditions hold, marks the user as returning and navigates to/open-explorerwith history replace. Otherwise, the existing redirect flow proceeds unchanged.OpenExplorerPage (new, self-contained)
accountfromConnectionProvidercontext (persists across navigation)localStorageGetIdentity(account)postIdentityendpointdecentraland://?dclenv={env}&signin={identityId}where env iszone/today/orgfor dev/stg/prodpostIdentityfailure or missing account/identity: shows error with "Go back to login"Feature flag
OPEN_EXPLORER_AFTER_LOGIN(dapps-open-explorer-after-login) — when disabled (default), behavior is completely unchanged.Test plan