Step 3. Test the app
In the following procedure, you run the sample app that you configured in the previous step. The app performs a centralized login on your PingOne instance.
Log in as a demo user
-
In Xcode, select
.Xcode launches the sample app in the iPhone simulator.
Figure 1. The iOS DaVinci sample main menu -
In the sample app on the iPhone simulator, tap Launch Davinci.
The sample app launches the DaVinci flow configured in the OAuth 2.0 profile.
Figure 2. The DaVinci sample app first screen with fields and buttons. -
Optionally, to register a new identity in PingOne:
-
Tap the No Account? Register now! link.
This link is an example of a FlowButton
.The app displays the registration screen:
Figure 3. The DaVinci sample app registration screen. -
Enter the details of the new identity, and then click Save.
The app creates the new identity in PingOne and returns to the sign on screen.
-
-
Sign on as a demo user:
-
Name:
demo
-
Password:
Ch4ng3it!
If authentication is successful, the application displays the tokens issued by PingOne.
Figure 4. The token issues by the DaVinci flow -
-
Tap Davinci to go back to the main menu, and then tap User Info.
The app retrieves the user’s info from the
/userinfo
endpoint and displays it on screen:Figure 5. User info retrieved from PingOne -
Tap Davinci to go back to the main menu, and then tap Logout.
The sample app displays a logout button.
Figure 6. Logout button in the iOS sample app -
Tap Proceed to logout
The app revokes the existing tokens and ends the session in PingOne.
To verify the user is signed out:
-
In the PingOne administration console, navigate to Directory > Users.
-
Select the user you signed in as.
-
From the Sevices dropdown, select Authentication:
Figure 7. Checking a user’s sessions in PingOne.The Sessions section displays any existing sessions the user has, and whether they originate from a mobile device.
-