Class Session
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
CreatedAt
[JsonProperty("created_at")]
public DateTime CreatedAt { get; set; }
Property Value
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
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
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
RefreshToken
A one-time used refresh token that never expires.
[JsonProperty("refresh_token")]
public string? RefreshToken { get; set; }
Property Value
TokenType
[JsonProperty("token_type")]
public string? TokenType { get; set; }
Property Value
User
[JsonProperty("user")]
public User? User { get; set; }
Property Value
Methods
Expired()
Returns true if the session has expired
public bool Expired()
Returns
ExpiresAt()
The expiration date of this session, in UTC time.
public DateTime ExpiresAt()