On this page

Add a sign-in form to your mobile app

Use the Okta Client SDK to build a secure and complete sign-in experience for your mobile app, giving your users seamless access while protecting their data.

Introduction

You've built a mobile app to access your customer portal and want to add identity-related functionality like an admin area, user profiles, and more. Use the Okta Client SDK for a complete, native user experience.

Learn

There are three key elements to enabling a mobile sign-in form with the Okta platform:

Plan

Consider how your users sign in when they access your portal before designing your sign-in form. Your Okta org includes three preset authentication policies (opens new window): password only, any one factor, and any two factors. Also, your org comes with four basic authentication factors enabled: password, email, SMS, and voice.

When you need to add an authentication factor (opens new window) or build a custom one, you can do it all in the Admin Console, no coding necessary.

Build

To integrate your mobile app with Okta, begin by creating an Okta account and org, and then set up the org. You can then implement a user-friendly sign-in experience using the Okta-hosted sign-in form or a self-hosted solution. After that, you can customize the authentication flow to meet your specific security requirements and brand aesthetics.

Set up your account

Sign up for an Okta account, and set up your new Okta org to test web apps:

Add a way for users to sign in

To keep it simple, Okta suggests initiating the sign-in process when a user accesses your app. This is often referred to as a "federation model." The app then triggers the sign-in flow with all the necessary context.

The Okta platform offers various deployment models to integrate a sign-in form into your portal, using the app as a point of entry:

The Okta-hosted way

The Okta-recommended way to sign users in to your portal is to redirect them to an Okta-hosted sign-in page. This page displays the Okta Sign-In Widget, which you can customize to reflect your brand.

Learn how to customize the Sign-In Widget to match your app's theme or your company's brand.

The self-hosted way

The alternative is to add a custom sign-in form in your portal. Then, use direct authentication to connect to Okta and to sign the user in:

Maintain a user session

After a user signs in, Identity Engine sends your app a set of tokens. These tokens identify the user, grant them access to their profile and other resources, and keep them signed in if they're idle for a while.

Add a way for users to sign out

How a user signs out of an app and what happens next are as important as how they sign in. What happens when they click the sign-out button? What do they see when they return to an app after their session has timed out? See the Add a sign-out experience guide for the answers.

Test your sign-in and sign-out flows

Now that you have everything set up, test that your sign-in and sign-out flows. See Validate SSO federation.

Congratulations, your mobile app now successfully signs users in and out. You can expand and customize the basic functionality that you’ve implemented in many ways:

Go deeper into the protocols underlying the sign-in processes:

This journey is part of the Secure your portal pathway, which also contains the following journeys: