Skip to content

signInWithProvider returns bool where as signIn returns GotrueSessionResponse #72

Closed

Description

@Shiba-Kar
Future<GotrueSessionResponse> signIn({
  String? email,
  String? phone,
  String? password,
  Provider? provider,
  OpenIDConnectCredentials? oidc,
  AuthOptions? options,
})
Future<bool> signInWithProvider(Provider provider, {AuthOptions? options})

as signInWithProvider returns bool , cant get the Session from it.

Activity

  1. DanMossa commented on Mar 30, 2022

    @DanMossa
    Collaborator

    Good catch. We should be returning the result of signIn and not launch

  2. DanMossa commented on Mar 30, 2022

    @DanMossa
    Collaborator

    Fixed in #73

  3. added
    auth
    on Apr 17, 2022
  4. jstnw10 commented on Jul 5, 2022

    @jstnw10

    Workaround until it is fixed in latest release: Use something like uni_links and catch deeplinks. Parse the refresh_token manually and call setSession() method.

  5. dshukertjr commented on Sep 29, 2022

    @dshukertjr
    Member

    Closing this issue as this is actually by design. Because provider sign in relies on opening an webview and coming back to the app via deeplinks, there is no way for the method to return the result of the sign in. Whether the sign in went through or not should be determined by listening to onAuthStateChanged callback!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    auth

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions