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

Fix explicit Oauth flow #118

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

heyitsaamir
Copy link
Contributor

@heyitsaamir heyitsaamir commented Mar 28, 2025

  • Currently our oauth flow works well for SSO, but not for explicit Oauth.
  • In explicit Oauth, the value for the tokenExchangeUrl is set to blank
    image
  • This means that this is NOT an SSO. When this is the case, the onTokenExchange will not be called. And this is the function which sets the storage value to indicate that an Oauth is actually happening. The onVerifyState checks if this value is present or not before proceeding.
  • In this PR, we set this value when the oauth card is sent if the value of tokenExchangeUrl is not present.
  • This also has the side effect of Oauth working normally in group chats.
  • Question: Should we just get rid of this check in onVerifyState? It'll simplify the code, but I don't know what the implications of it are. @aacebo
Screen.Recording.2025-03-28.at.3.33.31.PM.mov

In this video, we're doing explicit Oauth in a group ^

@heyitsaamir heyitsaamir requested review from aacebo and corinagum March 28, 2025 22:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant