2

I work for a B2B SaaS company which services companies that have different Single Sign On providers. We're working on integrating SSO into the mobile and server side of things using Open Id Connect & OAuth2.0 protocols.

I'm just double checking that I understand the flow correctly, so please correct me if I'm wrong:

The expected flow is:

b2b saas flow

  1. User opens the mobile app and enters their email
  2. Using Tenant Discovery we determine which IDP they are using (if any) and redirect them to the login page using a CustomTab (We're using AppAuth library on iOS and Android)
  3. They enter in their credentials, which go to their IDP with a PKCE
  4. AppAuth receives an AuthToken, which it then uses with the code_verification of the PKCE to get an access token.
  5. The mobile app takes the access token and hands it off to our server in a login post with the user email.
  6. The server uses the access token to back-channel talk to the IDP and verify the user by grabbing their email address.
  7. The user's email address is verified, then we generate our authentication and cross site forgery cookies which return back to the client.

Is that all correct?

Community
  • 1
  • 1
Matthew Bahr
  • 337
  • 1
  • 15

0 Answers0