Module

Yoga.BetterAuth.BetterAuth

Package
purescript-yoga-better-auth
Repository
rowtype-yoga/purescript-yoga-better-auth

#betterAuth Source

betterAuth :: forall opts opts_. Union opts opts_ BetterAuthOptionsImpl => Record opts -> Effect Auth

#runMigrations Source

#BetterAuthOptionsImpl Source

type BetterAuthOptionsImpl :: Row Typetype BetterAuthOptionsImpl = (appName :: String, basePath :: String, baseURL :: String, database :: Database, emailAndPassword :: EmailAndPassword, plugins :: Array Plugin, secret :: String, socialProviders :: SocialProviders, trustedOrigins :: Array String)

#EmailAndPassword Source

#emailAndPassword Source

emailAndPassword :: forall opts opts_. Union opts opts_ EmailAndPasswordImpl => Record opts -> EmailAndPassword

#EmailAndPasswordImpl Source

type EmailAndPasswordImpl :: Row Typetype EmailAndPasswordImpl = (autoSignIn :: Boolean, disableSignUp :: Boolean, enabled :: Boolean, maxPasswordLength :: Int, minPasswordLength :: Int, requireEmailVerification :: Boolean)

#getSession Source

getSession :: { headers :: WebHeaders } -> Api -> Aff SessionWithUser

#signInEmail Source

signInEmail :: { email :: Email, password :: Password } -> Api -> Aff SignInResult

#signUpEmail Source

signUpEmail :: { email :: Email, name :: UserName, password :: Password } -> Api -> Aff SignUpResult

#signOut Source

signOut :: { headers :: WebHeaders } -> Api -> Aff { success :: Boolean }

#signInSocial Source

signInSocial :: forall opts opts_. Union opts opts_ SignInSocialOptionsImpl => { provider :: ProviderId | opts } -> Api -> Aff SignInSocialResult

Re-exports from Yoga.BetterAuth.Types

#WebRequest Source

#WebHeaders Source

#User Source

type User = { createdAt :: ISODateString, email :: Email, emailVerified :: Boolean, id :: UserId, image :: Maybe String, name :: UserName, updatedAt :: ISODateString }

#SignUpResult Source

type SignUpResult = { token :: Token, user :: User }

#SignInResult Source

type SignInResult = { redirect :: Boolean, token :: Token, user :: User }

#SessionWithUser Source

type SessionWithUser = { session :: Session, user :: User }

#Session Source

type Session = { createdAt :: ISODateString, expiresAt :: ISODateString, id :: SessionId, ipAddress :: Maybe String, token :: Token, updatedAt :: ISODateString, userAgent :: Maybe String, userId :: UserId }

#Plugin Source

data Plugin

#Database Source

#AuthClient Source

#Auth Source

data Auth

#Api Source

data Api

#Account Source

type Account = { accessToken :: Maybe Token, accountId :: String, createdAt :: ISODateString, id :: String, idToken :: Maybe Token, providerId :: String, refreshToken :: Maybe Token, scope :: Maybe String, updatedAt :: ISODateString, userId :: UserId }