Skip to content
This repository has been archived by the owner on May 10, 2023. It is now read-only.

User authentication

Ahmed Castro edited this page Jan 24, 2019 · 14 revisions

We authenticate users via a simple email verification flow - which is used to generate OAuth 2 access tokens. A user can manage the tokens they have been issued via their OAuth 2 token page.

Email authentication flow

Authentication occurs by asking for their email and then for the 5-digit security code sent to their email. To do so, first call emailRequest to send the email and then emailExchange to exchange the security code for an access token that will be handled internally by the SDK so you won't need to deal with it.

Functions

ModioEmailRequest

API endpoint: Authentincation

Request a security_code be sent to the email address of the user you wish to authenticate.

Parameters

Name Type Description
email FString A valid and secure email address your user has access to.

email_request

OnModioEmailRequest callback

Callback triggered once ModioEmailRequest finishes.

Name Type Description
response_code int32 mod.io response status.

on_email_request

ModioEmailExchange

API endpoint: Authentincation

Parameters

Name Type Description
security_code FString Unique 5-digit code sent to the email address supplied in the previous request..

email_exchange

OnModioEmailRequest callback

Callback triggered once ModioEmailExchange finishes.

Name Type Description
response_code int32 mod.io response status.

on_email_exchange

ModioIsLoggedIn

Returns true if the user is logged in, otherwise returns false.

is_logged_in

ModioLogout

Logs out the user from mod.io.

logout