Authenticate with password

This page covers how to set up your ReachFive project to allow users to authenticate with either a phone number, email, or custom identifier. Authenticating with a password is a well-known authentication approach and is available for your users with ReachFive. This can be accomplished using our SDK or via our Identity API.

Use Postman?

If using Postman, we have provided you with a simple Postman collection to test out the API calls.

Authentication flow overview

This flow shows the overall flow for a user authenticating with a password. The steps in the following section take a closer look at each operation in the flow.

%%{init: {'theme': 'base', 'themeVariables': { 'primaryColor': '#00c24a', 'fontSize': '20px', 'noteBkgColor': '#c1c1c1', 'edgeLabelBackground':'#eee', 'tertiaryColor': '#e1e1e1'}}}%%
sequenceDiagram
autonumber
    User->>App: Request login
    Note over App,R5: loginWithPassword
    R5->>App: If success, receive tkn
    App->>R5: tkn for authorization_code
    Note over App,R5: oauth/authorize
    R5->>App: receive authorization_code
    App->>R5: authorization_code for access token
    Note over App,R5: oauth/token
    R5->>App: Provide access_token
    App->>User: Successful login
    Note over App,User: Redirects to redirect_uri

Authentication steps

The steps here provide a general implementation overview for the Identity API, and provide the Core SDK and UI SDK associated methods.

  1. User provides credentials to log in. A temporary tkn is sent back in response.

    Calls
    diagram
  2. You (the brand) exchange the temporary tkn to get the authorization_code.

    Calls
    %%{init: {'theme': 'base', 'themeVariables': { 'primaryColor': '#00c24a', 'fontSize': '20px', 'noteBkgColor': '#c1c1c1', 'edgeLabelBackground':'#eee', 'tertiaryColor': '#e1e1e1'}}}%%
    sequenceDiagram
        App->>R5: tkn for authorization_code
        Note over App,R5: oauth/authorize
        R5->>App: receive authorization_code
  3. You then exchange the authorization_code to get an Access Token, ID Token, and/or a Refresh Token.