Introduction
This article describes the Perfect Gym GO mobile application login and sign up flow. It also describes authentication differences between the Universal and White Label apps.
Before you begin
- You should have a basic understanding of the differences between the Universal and White Label apps.
- You should also know the difference between CP2 and Go API account.
GoAPI vs CP2 Accounts
GoAPI is a backend PG GO component that manages user accounts and serves data to iOS and Android mobile apps. The App user's account is identified with a unique email address. From the business point of view, Go API stores user accounts for the Universal app. To authenticate White Label users, Go Api uses Client Portal credentials.
That means that:
- Single e-mail address is a single account in GO Api which could be used both in Univeral and White Label apps.
- There are 2 way to create and access account in GO Api:
- By White Label app by providing CP2 account credentials
- By Universal app
- Please keep in mind that passwords are different for White Label and Univers
- Changing the user's password with PGM / CP2 will impact CP2 Account, effectively changing the user's White Label app password. It has no impact on GoApi Account thus has no impact on the user's Universal app password
- Changing user's password initiated with the "Forget password" feature from within the Universal app will impact Go Api Account, effectively changing the user's Universal app password. It has no impact on CP2 Account thus has no impact on user's White Label app password
Email change
When user's email is changed in PGM it means the email change of his/her CP2 account. Depending on circumstances couple of things can happen to his Go API account:
- If Go API account is connected to only one CP2 account and user is using only WL app then Go API's account email is updated
- If Go API account is connected to more than one CP2 accounts then CP2 accounts are disconnected from Go API account
- If Go API account is connected to only one CP2 account and user is using only Universal app then nothing more happens i.e. CP2 account has new email, Go API account has the same email as before and accounts are still connected.
Universal PG GO Log In & Sign up Flow
Universal app uses GoApi accounts to validate user credentials, which means that Client Portal credentials will not work.
PG GO Log In is divided into 2 steps:
The user enters the email address and taps 'Next'.
The app will verify if the email address exists in PG GO backend (Go API)
- If an email address exists user will be asked to enter his password
- If a password is correct, the user will be granted access to the mobile app
- If a password is invalid, the user will receive "Invalid password" error message
- If an email does not exist user will be asked to sign up
- User has to provide basic information like first name, last name and password
- After tapping the "Register" the user will be asked to confirm his email address by clicking an activation link sent via email. Before email confirmation an app is in discovery state, that means that user can browse clubs catalog, but can not sign up for classes
White Label PG GO Log In Flow
White Label app uses CP2 accounts to validate user credentials, which means that GoApi credentials will not work.
To log into the White Label app, the user has to be registered in PGM. To log in, the user should use the email addresses used for PGM registration. White label apps do not allow for user sign up, but can redirect to CP2 online joining (based on company configuration)
PG GO White Label Log In is divided into 2 steps:
The user enters the email address and taps 'Next'.
The app will verify if CP2 Account with given email address exists
- If an email address exists and CP2 password is already set (user has used CP2 before) user will be asked to enter his password
- If a password is correct, the user will be granted access to the mobile app
- If a password is invalid, the user will receive "Invalid password" error message
- If an email address exists but CP2 password is not (user did not use CP2 before)
- User will be asked to provide the new password
- After the password is provided, the user will be sent an email with a confirmation link (before confirmation password is not set)
- Clicking confirmation link effectively sets user password. Before clicking the confirmation link, the user can not use an app. After clicking confirmation link user can access both: White Label app and CP2 using created password
If email address doesn't exist in PGM, CP2, GoApi there are two options:
- If client has configured Online Joining - user will be redirected to CP2 on registration page
- If client hasn't configured Online Joining - user will see error message.