signOut method

Future<void> signOut(
  1. String jwt, {
  2. SignOutScope scope = SignOutScope.global,
})

Removes a logged-in session.

Implementation

Future<void> signOut(
  String jwt, {
  SignOutScope scope = SignOutScope.global,
}) async {
  final options = GotrueRequestOptions(
    headers: _headers,
    noResolveJson: true,
    jwt: jwt,
    query: {'scope': scope.name},
  );

  await _fetch.request(
    '$_url/logout',
    RequestMethodType.post,
    options: options,
  );
}