-
Notifications
You must be signed in to change notification settings - Fork 4
User Authentication
User Authentication methods make possible handling user sessions. For more information about the methods wrapped please visit User Authentication (C compatible) documentation on the SDK wiki.
emailRequest(email:String, callback:(response:Dynamic)):Void
Requests a 5-digit security code to be sent via email. emailExchange should be called after to complete the authentication process.
SDK documentation: modioEmailRequest
API documentation: Authentication
Name | Type | Description |
---|---|---|
String |
User's email. | |
callback | (response:Dynamic) |
Function called once the process finished. |
Name | Type | Description |
---|---|---|
response | Dynamic |
Response object |
emailExchange(security_code:String, callback:(response:Dynamic)):Void
Exchanges the 5-digit code for an authentication token. The token is handled internally by the SDK.
SDK documentation: modioEmailExchange
API documentation: Authentication
Name | Type | Description |
---|---|---|
security_code | String |
5-digit code sent to users via email when emailRequest was called. |
callback | (response:Dynamic) |
Function called once the process finished. |
Name | Type | Description |
---|---|---|
response | Dynamic |
Response object returned from the mod.io API. |
isLoggedIn():Bool
Returns true if the user is logged in, otherwise returns false.
SDK documentation: modioIsLoggedIn
API documentation: Authentication
logout():Bool
Logs out the user from mod.io.
SDK documentation: modioLogout
API documentation: Authentication