Table of Contents

Class Session

Namespace
Supabase.Gotrue
Assembly
Supabase.Gotrue.dll

Represents a Gotrue Session

public class Session
Inheritance
Session
Inherited Members

Properties

AccessToken

The access token jwt. It is recommended to set the JWT_EXPIRY to a shorter expiry value.

[JsonProperty("access_token")]
public string? AccessToken { get; set; }

Property Value

string

CreatedAt

[JsonProperty("created_at")]
public DateTime CreatedAt { get; set; }

Property Value

DateTime

ExpiresIn

The number of seconds until the token expires (since it was issued). Returned when a login is confirmed.

[JsonProperty("expires_in")]
public long ExpiresIn { get; set; }

Property Value

long

ProviderRefreshToken

The oauth provider refresh token. If present, this can be used to refresh the provider_token via the oauth provider's API. Not all oauth providers return a provider refresh token. If the provider_refresh_token is missing, please refer to the oauth provider's documentation for information on how to obtain the provider refresh token.

[JsonProperty("provider_refresh_token")]
public string? ProviderRefreshToken { get; set; }

Property Value

string

ProviderToken

The oauth provider token. If present, this can be used to make external API requests to the oauth provider used.

[JsonProperty("provider_token")]
public string? ProviderToken { get; set; }

Property Value

string

RefreshToken

A one-time used refresh token that never expires.

[JsonProperty("refresh_token")]
public string? RefreshToken { get; set; }

Property Value

string

TokenType

[JsonProperty("token_type")]
public string? TokenType { get; set; }

Property Value

string

User

[JsonProperty("user")]
public User? User { get; set; }

Property Value

User

Methods

Expired()

Returns true if the session has expired

public bool Expired()

Returns

bool

ExpiresAt()

The expiration date of this session, in UTC time.

public DateTime ExpiresAt()

Returns

DateTime