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#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
newtype EmailAndPassword#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#signInSocial Source
signInSocial :: forall opts opts_. Union opts opts_ SignInSocialOptionsImpl => { provider :: ProviderId | opts } -> Api -> Aff SignInSocialResultRe-exports from Yoga.BetterAuth.Types
#WebRequest Source
data WebRequest#WebHeaders Source
type WebHeaders = Headers#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 }#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 }#AuthClient Source
data AuthClient