ForgeRock Developer Experience

Step 7. Test the app

In this step, you run and test your application.

You run it in the emulator or on your Android device, perform authentication with a demo user, check the log for success messages, and then log out the user.

Log in as a demo user

  1. In Android Studio, select Run  Run 'app'.

  2. Click Log in.

    The fragment dialog appears, with fields for both name and password, as well as continue and cancel buttons:

    The dialog fragment with text fields and buttons.
  3. Enter the credentials of the demo user:

    • Name: demo

    • Password: Ch4ng3it!

  4. Click Continue.

    If authentication is successful, the application returns to the main screen, and displays "User is authenticated."

  5. Open the Logcat pane.

    If authentication was successful, the log contains entries similar to the following:

    13:41:37 D [3.4.0]: Journey finished with Success outcome.
    13:41:37 D [3.4.0]: Token received.

    If authentication fails:

    • Check the credentials you are using are correct.

      For example, attempt to log directly into your ID Cloud or AM instance using them.

    • Check your strings.xml has the correct values for your environment

  6. Click the Log out button.

    If logout is successful, the application displays "User is not authenticated."

    The Logcat pane contains entries similar to the following:

    14:27:31 D [3.4.0]: Revoke success
    14:27:31 D [3.4.0]: Revoking AccessToken & Refresh Token Success

Next Steps

Copyright © 2010-2024 ForgeRock, all rights reserved.