Skip to content

Commit

Permalink
fix: add a migration guide on auth related features on changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
dshukertjr committed Aug 1, 2022
1 parent 84844e2 commit b2c2f90
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,44 @@
## [1.0.0-dev.1]
- feat: add Mac OS and Windows support for deeplinks
- BREAKING: Remove SupabaseAuthRequiredState as well as overriding methods in SupabaseAuthState
```dart
// Before
await Supabase.initialize(
url: 'SUPABASE_URL',
anonKey: 'SUPABASE_ANON_KEY',
);
...
// Class extending `SupabaseAuthState` or `AuthRequiredState` was necessary
// to persist auth state
class AuthState<T extends StatefulWidget> extends SupabaseAuthState<T> {
...
}
// After
// Initializing Supabase is all you need to do to persist auth state
// Deeplinks will also be automatically handled when you initialize Supabase.
await Supabase.initialize(
url: 'SUPABASE_URL',
anonKey: 'SUPABASE_ANON_KEY',
);
...
// You can get the initial session of the user with `SupabaseAuth.instance.initialSession`
try {
final initialSession = await SupabaseAuth.instance.initialSession;
} catch(error) {
// Handle errors in session initial recovery here
}
// You should now use `onAuthStateChanged` as the
Supabase.instance.client.auth.onAuthStateChange((event, session) {
// handle sinin/ signups here
});
```
- fix: OAuth should open in an external browser
- BREAKING: update supabase package [v1.0.0-dev.1](https://github.com/supabase-community/supabase-dart/blob/main/CHANGELOG.md#100-dev1)

Expand Down

0 comments on commit b2c2f90

Please sign in to comment.