signOut method
Removes a logged-in session.
Implementation
Future<GotrueResponse> signOut(String jwt) async {
try {
final headers = {...this.headers};
headers['Authorization'] = 'Bearer $jwt';
final options = FetchOptions(headers, noResolveJson: true);
final response = await _fetch.post('$url/logout', {}, options: options);
return response;
} catch (e) {
return GotrueResponse(error: GotrueError(e.toString()));
}
}