Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

feat: added return types to auth methods

dshukertjre894d6a5dfd6
diff --git a/apps/reference/_supabase_dart/generated/auth-session.mdx b/apps/reference/_supabase_dart/generated/auth-session.mdx
index b15acf2435f..2695de7e177 100644
--- a/apps/reference/_supabase_dart/generated/auth-session.mdx
+++ b/apps/reference/_supabase_dart/generated/auth-session.mdx
@@ -11,7 +11,7 @@ import TabItem from '@theme/TabItem'
Returns the session data, if there is an active session.
```dart
-final session = supabase.auth.currentSession;
+final Session? session = supabase.auth.currentSession;
```
## Examples
@@ -19,5 +19,5 @@ final session = supabase.auth.currentSession;
### Get the session data
```dart
-final session = supabase.auth.currentSession;
+final Session? session = supabase.auth.currentSession;
```
diff --git a/apps/reference/_supabase_dart/generated/auth-signin.mdx b/apps/reference/_supabase_dart/generated/auth-signin.mdx
index a850641fefe..93c12ffd39b 100644
--- a/apps/reference/_supabase_dart/generated/auth-signin.mdx
+++ b/apps/reference/_supabase_dart/generated/auth-signin.mdx
@@ -11,9 +11,9 @@ import TabItem from '@theme/TabItem'
Log in an existing user, or login via a third-party provider.
```dart
-final res = await supabase.auth.signIn(email: '[email protected]', password: 'example-password');
+final GotrueSessionResponse res = await supabase.auth.signIn(email: '[email protected]', password: 'example-password');
-final user = res.user;
+final User? user = res.user;
```
## Notes
@@ -29,9 +29,9 @@ final user = res.user;
### Sign in with email.
```dart
-final res = await supabase.auth.signIn(email: '[email protected]', password: 'example-password');
+final GotrueSessionResponse res = await supabase.auth.signIn(email: '[email protected]', password: 'example-password');
-final user = res.user;
+final User? user = res.user;
```
### Sign in with magic link.
@@ -39,7 +39,7 @@ final user = res.user;
If email is provided, but no password is provided, the user will be sent a "magic link" to their email address, which they can click to open your application with a valid session. By default, a given user can only request a Magic Link once every 60 seconds.
```dart
-final res = await supabase.auth.signIn(email: '[email protected]');
+final GotrueSessionResponse res = await supabase.auth.signIn(email: '[email protected]');
```
### Get OAuth sign in URL.
@@ -48,7 +48,7 @@ Passing provider parameter to `signIn()` will return a URL to sign your user in
If you are looking to sign in a user via OAuth on Flutter app, go to [`signInWithProvider()`](/docs/reference/dart/auth-signinwithprovider).
```dart
-final res = await supabase.auth.signIn(provider: Provider.github);
+final GotrueSessionResponse res = await supabase.auth.signIn(provider: Provider.github);
-final user = res.user;
+final User? user = res.user;
```
diff --git a/apps/reference/_supabase_dart/generated/auth-signinwithprovider.mdx b/apps/reference/_supabase_dart/generated/auth-signinwithprovider.mdx
index e47d2ec6058..cc7078af3f4 100644
--- a/apps/reference/_supabase_dart/generated/auth-signinwithprovider.mdx
+++ b/apps/reference/_supabase_dart/generated/auth-signinwithprovider.mdx
@@ -50,6 +50,6 @@ await supabase.auth.signInWithProvider(Provider.github,
...
// after user comes back from signin flow
-final session = supabase.auth.currentSession;
-final oAuthToken = session?.providerToken;
+final Session? session = supabase.auth.currentSession;
+final String? oAuthToken = session?.providerToken;
```
diff --git a/apps/reference/_supabase_dart/generated/auth-signup.mdx b/apps/reference/_supabase_dart/generated/auth-signup.mdx
index 430fc86bced..1174fb7a608 100644
--- a/apps/reference/_supabase_dart/generated/auth-signup.mdx
+++ b/apps/reference/_supabase_dart/generated/auth-signup.mdx
@@ -11,10 +11,9 @@ import TabItem from '@theme/TabItem'
Creates a new user.
```dart
+final GotrueSessionResponse res = await supabase.auth.signUp('[email protected]', 'example-password');
-final res = await supabase.auth.signUp('[email protected]', 'example-password');
-
-final user = res.user;
+final User? user = res.user;
```
## Notes
@@ -29,9 +28,9 @@ final user = res.user;
### Sign up.
```dart
-final res = await supabase.auth.signUp('[email protected]', 'example-password');
+final GotrueSessionResponse res = await supabase.auth.signUp('[email protected]', 'example-password');
-final user = res.user;
+final User? user = res.user;
```
### Sign up with third-party providers.
diff --git a/apps/reference/_supabase_dart/generated/auth-update.mdx b/apps/reference/_supabase_dart/generated/auth-update.mdx
index 1f18f74a6a9..1d95999e765 100644
--- a/apps/reference/_supabase_dart/generated/auth-update.mdx
+++ b/apps/reference/_supabase_dart/generated/auth-update.mdx
@@ -11,7 +11,7 @@ import TabItem from '@theme/TabItem'
Updates user data, if there is a logged in user.
```dart
-final res = await supabase.auth.update(UserAttributes(data: {'hello': 'world'}));
+final GotrueUserResponse res = await supabase.auth.update(UserAttributes(data: {'hello': 'world'}));
```
## Notes
@@ -24,5 +24,5 @@ Use the `update()` method if you have data which rarely changes or is specific o
### Update a user's metadata.
```dart
-final res = await supabase.auth.update(UserAttributes(data: {'hello': 'world'}));
+final GotrueUserResponse res = await supabase.auth.update(UserAttributes(data: {'hello': 'world'}));
```
diff --git a/apps/reference/_supabase_dart/generated/auth-user.mdx b/apps/reference/_supabase_dart/generated/auth-user.mdx
index c813866ab83..25be1f9609c 100644
--- a/apps/reference/_supabase_dart/generated/auth-user.mdx
+++ b/apps/reference/_supabase_dart/generated/auth-user.mdx
@@ -11,7 +11,7 @@ import TabItem from '@theme/TabItem'
Returns the user data, if there is a logged in user.
```dart
-final user = supabase.auth.currentUser;
+final User? user = supabase.auth.currentUser;
```
## Examples
@@ -19,5 +19,5 @@ final user = supabase.auth.currentUser;
### Get the logged in user
```dart
-final user = supabase.auth.currentUser;
+final User? user = supabase.auth.currentUser;
```