Returns the session data, if there is an active session.
currentSession is a synchronous getter that returns whatever session is stored, even one whose access token has already expired.getSession() is an asynchronous alternative that guarantees a valid access token when it resolves: a still-valid session is returned as-is, while an expired one is refreshed on demand first. It returns null when there is no session and throws an AuthException when an expired session cannot be refreshed.final Session? session = supabase.auth.currentSession;
final session = await supabase.auth.getSession();