Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Authenticator ¶
type Authenticator struct {
// contains filtered or unexported fields
}
Authenticator is a utility for performing authentication of the given user. It carries necessary metadata for spinning up a local server alongside channels for errors and when authentication is "done".
func NewAuthenticator ¶
func NewAuthenticator() *Authenticator
NewAuthenticator returns a new Authenticator for the caller with instantiated channels
func (*Authenticator) CheckSession ¶
func (a *Authenticator) CheckSession() error
CheckSession checks if a session is already authenticated based on the expiration time for the given session on disk.
func (*Authenticator) GetSessionToken ¶ added in v1.3.0
func (a *Authenticator) GetSessionToken() (string, error)
GetSessionToken returns the access token for a given session
func (*Authenticator) Login ¶
func (a *Authenticator) Login() (string, error)
Login performs the login flow for a user. This flow uses Supabase auth and a local server for handling the login. Once the server has completed and received the session, the server is shut down and control is returned back to the CLI.