AuthSettings class

Constructors

AuthSettings({required JWTKey jwtSecretKey, String collectionName = DefaultAuthSettings.collectionName, bool allowDuplicateEmails = DefaultAuthSettings.allowDuplicateEmails, Duration authExpireAfter = DefaultAuthSettings.authExpireAfter, String authUpdatesCollName = DefaultAuthSettings.authUpdatesCollName, JWTAlgorithm jwtAlgorithm = JWTAlgorithm.HS256})
this will define how many times user can login while there is another active jwt to be used to prevent so many creations of jwts this will restrict the usage of your endpoints on some apps that will provide app id in all request headers on the format headerKey = appid, and with value of the app id
const

Properties

allowDuplicateEmails bool
this will be used to allow duplicate emails so you can use multi providers(facebook, email, google, etc...)
final
authExpireAfter Duration
the jwt will expire after this duration so the user must login again for a new jwt
final
authUpdatesCollName String
this is the collection name for the active tokens of the user to keep track of all user sessions
final
collectionName String
this is the collection name of the auth table(collection) that you want to save users auth info in
final
hashCode int
The hash code for this object.
no setterinherited
jwtAlgorithm → JWTAlgorithm
this is the algorithm used to deal with the jwt
final
jwtSecretKey → JWTKey
this is the jwt secret key [Must be stored in a safe place]
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited