spotless

Values

pub fn authenticate(
  service: String,
  scope: List(String),
  state: String,
  port: Int,
  code_challenge_method: proof_key_for_code_exchange.CodeChallengeMethod,
) -> effect.Effect(Result(token.Response, snag.Snag), a)

The authenticate function and therefore all named helpers builds upon the oauth_2_1.authorize function This use the task.Follow effect and keeps the process state in memory as a continuation. Keeping the state in memory is not possible if the state needs to be serialized in any way. For example a server that would keep code_verifier in a session cannot keep a gleam continuation in a session.

Instead use the _server function and use oauth_2_1.start

pub fn bsky(
  port: Int,
  scope: List(String),
  state: String,
  keypair: effect.KeyPair(a),
) -> effect.Effect(Result(token.Response, snag.Snag), a)
pub fn dnsimple(
  port: Int,
) -> effect.Effect(Result(String, snag.Snag), a)
pub fn dropbox(
  port: Int,
  scopes: List(String),
) -> effect.Effect(Result(String, snag.Snag), a)
pub fn github(
  port: Int,
  scopes: List(String),
) -> effect.Effect(Result(String, snag.Snag), a)
pub fn google(
  port: Int,
  scopes: List(String),
) -> effect.Effect(Result(String, snag.Snag), a)
pub fn linkedin(
  port: Int,
  scopes: List(String),
) -> effect.Effect(Result(String, snag.Snag), a)
pub fn local(port: Int, path: String) -> oauth_2_1.App
pub fn netlify(
  port: Int,
  scopes: List(String),
) -> effect.Effect(Result(String, snag.Snag), a)
pub fn server(
  service: String,
) -> Result(oauth_2_1.AuthorizationServer, Nil)
pub fn strava(
  port: Int,
  scopes: List(String),
) -> effect.Effect(Result(String, snag.Snag), a)
pub fn twitter(
  port: Int,
  scopes: List(String),
) -> effect.Effect(Result(String, snag.Snag), a)
pub fn vimeo(
  port: Int,
  scopes: List(String),
) -> effect.Effect(Result(String, snag.Snag), a)
Search Document