gotrue 1.4.0 copy "gotrue: ^1.4.0" to clipboard
gotrue: ^1.4.0 copied to clipboard

A dart client library for the GoTrue API.

[1.4.0] #

  • feat: add support for MFA
    // Start the enrollment process for a new Multi-Factor Authentication (MFA) factor
    final res = await client.mfa
      .enroll(issuer: 'MyFriend', friendlyName: 'MyFriendName');
    
    // Prepares a challenge used to verify that a user has access to a MFA factor.
    final res = await client.mfa.challenge(factorId: factorId1);
    
    // Verifies a code against a challenge.
    final res = await client.mfa
            .verify(factorId: factorId1, challengeId: challengeId, code: getTOTP());
    
    Read more about MFA with Supabase here

[1.3.0] #

  • feat: paginate admin.listUsers()
    auth.admin.listUsers(page: 2, perPage: 10);
    

[1.2.1] #

  • fix: allow nullable role and updatedAt in User.fromJson() #108

[1.2.0] #

  • feat: add createUser(), deleteUser(), and listUsers() to admin methods. #106

[1.1.1] #

  • fix: use correct token for refreshing #104

[1.1.0] #

  • fix: redirect_to double URL encoding issue #102
  • fix: avoid positive lookbehind in snake case extension (#100)
  • fix: reset token retry count on session remove #98
  • feat: fail to getSessionFromUrl throws error on onAuthStateChange #99
    supabase.onAuthStateChange.listen((data) {
      // handle auth state change here
    }, onError: (error) {
      // handle error here
    });
    

[1.0.2] #

  • fix: verify otp exception on successful verification (#95)
  • fix: query parameter format for redirect_to when making request (#96)
  • fix: reset token retry count on session remove (#98)

[1.0.1] #

  • fix: a bug where emailRedirect does not work properly (#92)

[1.0.0] #

  • chore: v1.0.0 release 🚀
  • BREAKING: update the public API to match JS library (#90)
    • signUp() now uses named parameters
      // Before
      final res = await supabase.auth.signUp('example@email.com', 'password');
      // After
      final res = await supabase.auth.signUp(email: 'example@email.com', password: 'password');
    
    • signIn() is split into different methods
      // Magic link signin
      // Before
      final res = await supabase.auth.signIn(email: 'example@email.com');
      // After
      final res = await supabase.auth.signInWithOtp(email: 'example@email.com');
    
      // Email and password signin
      // Before
      final res = await supabase.auth.signIn(email: 'example@email.com', password: 'password');
      // After
      final res = await supabase.auth.signInWithPassword(email: 'example@email.com', password: 'password');
    
    • onAuthStateChange is now a stream
      // Before
      supabase.auth.onAuthStateChange((event, session) {
        // ...
      });
      // After
      final subscription = supabase.auth.onAuthStateChange().listen((data) {
        final AuthChangeEvent event = data.event;
        final Session? session = data.session;
      });
      // Don't forget to cancel the subscription when you're done
      subscription.cancel();
    
    • update() is renamed to updateUser()
      // Before
      final res = await supabase.auth.update(
          UserAttributes(
            email: 'new@email.com',
            data: {
              'username': 'new_username',
            },
          ),
      );
      // After
      final res = await supabase.auth.updateUser(
          UserAttributes(
            email: 'new@email.com',
            data: {
              'username': 'new_username',
            },
          ),
      );
    

[1.0.0-dev.4] #

  • fix: encoding issue with some languages(#89)

[1.0.0-dev.3] #

  • BREAKING: data property of GotrueSessionResponse is renamed to session(#87)
  • fix: bug where siningup with email verification throwed an exception(#87)

[1.0.0-dev.2] #

  • BREAKING: rename GotrueError to GoTrueException

[1.0.0-dev.1] #

  • chore: Update lints to v2.0.0
  • feat: Add .generateLink() method(#83)
  • fix: Nullable type error if signInWithEmail is used twice(#84)

[0.2.3] #

  • feat: Able to update phone number with auth.update method(#81)

[0.2.2+1] #

  • fix: type casting of phone auth response(#79)

[0.2.2] #

  • fix: OpenIDConnectCredentials's nonce parameter optional
  • fix: use completer in the retry logic to return value when token refresh is complete(#75)

[0.2.1] #

  • fix: Retry access token refresh when offline (#63)
  • feat: Can add custom http client(#69)
  • feat: Show statuscode in GotrueResponse(#69)

[0.2.0] #

  • BREAKING: user will be returned when signing up with auto confirm off (#63)
  • feat: Slack and Shopify as login providers(43)
  • fix: Adds missing keys - phone, phone_confirmed_at, emailed_confirmed_at to User.toJson()(43)

[0.1.6] #

  • fix: fetch the user, if missing, on /verify (#29)
  • feat: add JWT headers when refreshing token (#53)
  • feat: add signInWithOpenIDConnect (#61)

[0.1.5] #

  • feat: add toString method to GotrueErrorclass

[0.1.4] #

  • fix: trigger signedIn event on recoverSession

[0.1.3] #

  • feat: add tokenRefreshed auth event
  • feat: add slack, spotify and twitch Auth providers
  • fix: update currentSession.user when GoTrueClient.update is called
  • chore: export missing types

[0.1.2] #

  • feat: setAuth() method for setting the session with a provided jwt
  • fix: improve client tests

[0.1.1] #

  • chore: add X-Client-Info header

[0.1.0] #

  • feat: add support for phone auth

[0.0.7] #

  • fix: stop refreshToken timer on session removed
  • fix: close http.Client on request done
  • chore: update External OAuth Providers
  • chore: add example code block

[0.0.6] #

  • fix: export gotrue_response classes

[0.0.5] #

  • BREAKING CHANGE: rename 'ProviderOptions' to 'AuthOptions'
  • feat: support redirectTo option
  • fix: handle jwt expiry less than 60 seconds

[0.0.4] #

  • fix: session refresh timer

[0.0.3] #

  • fix: wrong timestamp value

[0.0.2] #

  • fix: persistSessionString with wrong expiresAt

[0.0.1] #

  • fix: URL encode redirectTo

[0.0.1-dev.11] #

  • fix: parsing provider callback url with fragment #12

[0.0.1-dev.10] #

  • fix: parses provider token and adds oauth scopes and redirectTo
  • fix: expiresAt conversion to int and getUser resolving JSON
  • fix: signOut method

[0.0.1-dev.9] #

  • fix: User nullable params
  • fix: Session nullable params
  • fix: lint errors

[0.0.1-dev.8] #

  • chore: Migrate to Null Safety

[0.0.1-dev.7] #

  • fix: Password and other attributes defaulting to email field.
  • chore: export UserAttributes

[0.0.1-dev.6] #

  • chore: export Provider class

[0.0.1-dev.5] #

  • fix: updateUser bug
  • fix: http success statusCode check
  • fix: stateChangeEmitters uninitialized value

[0.0.1-dev.4] #

  • fix: email verification required on sign up

[0.0.1-dev.3] #

  • chore: export Session and User classes

[0.0.1-dev.2] #

  • fix: session and user parsing from json
  • chore: method to get persistSessionString

[0.0.1-dev.1] #

  • Initial pre-release.