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

Enable signin using popup modals instead of redirections #394

Conversation

FedericoAmura
Copy link
Contributor

@FedericoAmura FedericoAmura commented Mar 6, 2024

Description

This PR adds a signin method that handles authenticating with an oauth provider using a popup modal instead of a redirect and two steps
This feature requires lit-login-server PR#4

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Manually built the SDK, dropped built files in the wagmi connector demo and used Google and Discord auth modal flows there. Also running a local version of lit login server

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

… to handle redirects instead of using the current window
@FedericoAmura FedericoAmura self-assigned this Mar 6, 2024
@Ansonhkg Ansonhkg mentioned this pull request Mar 12, 2024
5 tasks
@Ansonhkg Ansonhkg changed the base branch from master to staging/3.2.6 March 12, 2024 06:37
@Ansonhkg
Copy link
Collaborator

This looks good to me. Just so you're aware, we also provide a callback in the sign-in function to handle their own way of signing in, e.g., a pop-up.

public async signIn(callback?: (url: string) => void): Promise<void> {

@Ansonhkg Ansonhkg merged commit 3322946 into staging/3.2.6 Mar 12, 2024
2 of 4 checks passed
@Ansonhkg Ansonhkg deleted the feature/lit-2638-enable-signin-using-popup-modals-instead-of-redirections branch March 12, 2024 06:40
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.

2 participants