Ping SDKs

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

  1. In Xcode, select Product  Run.

    Xcode launches the sample app in the iPhone simulator.

    ios kotlin davinci main menu
    Figure 1. The iOS DaVinci sample main menu
  2. 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.

    ios kotlin davinci login
    Figure 2. The DaVinci sample app first screen with fields and buttons.
  3. Optionally, to register a new identity in PingOne:

    1. Tap the No Account? Register now! link.

      This link is an example of a FlowButton.

      The app displays the registration screen:

      The DaVinci sample app registration screen
      Figure 3. The DaVinci sample app registration screen.
    2. 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.

  4. Sign on as a demo user:

    • Name: demo

    • Password: Ch4ng3it!

    If authentication is successful, the application displays the tokens issued by PingOne.

    ios kotlin davinci access token
    Figure 4. The token issues by the DaVinci flow
  5. 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:

    ios kotlin davinci userinfo
    Figure 5. User info retrieved from PingOne
  6. Tap Davinci to go back to the main menu, and then tap Logout.

    The sample app displays a logout button.

    ios kotlin davinci logout
    Figure 6. Logout button in the iOS sample app
  7. Tap Proceed to logout

    The app revokes the existing tokens and ends the session in PingOne.

    To verify the user is signed out:

    1. In the PingOne administration console, navigate to Directory > Users.

    2. Select the user you signed in as.

    3. From the Sevices dropdown, select Authentication:

      pingone sessions en
      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.