Auth class

Authentication class Learn more: https://nylo.dev/docs/5.x/authentication

Constructors

Auth()

Properties

hashCode int
The hash code for this object.
no setterinherited
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

Static Methods

loggedIn({String? key}) Future<bool>
Check if a user is logged in for a given key.
login(dynamic auth, {String? key}) Future
Login a auth user for a given key.
loginModel(String key, Model toModel(dynamic data)) → dynamic
Login a model into the app. key that the user was stored under. toModel is a function that converts the data into a model. the data parameter will contain the data that was stored in the storage. Example:
logout({String? key}) Future
Logout the auth user for a given key.
remove({String? key}) Future
Remove the auth user for a given key.
set(dynamic auth, {String? key}) Future<void>
Set the auth user
user<T>({String? key}) → T?
Get the auth user