Auth0 With Ionic 4

TL;DR
Adding Auth0 to Ionic 4 App

A lot was learned from using Auth0 with Ionic 3. This builds upon that knowledge:

  • Custom URL Scheme will determine which app should be opened, so the scheme should reflect the application. This is the same as before.
  • Unsure what value is provided by having different tenants unless this is the only way we could provide either passwordless or social. Need to determine this. Tenant Name should be more clear regarding which is which.
    • Looking at the connections that are available for a tenant, it appears the choices are not mutually exclusive. Will try using a tenant that supports both.
    • Provide multiple "Auth0 Applications", each supporting a specific connector (email or social).
    • Auth0 applications are identified by their "Client ID", an opaque token, and the client secret (essentially a long password).

Custom URL Scheme

This determines which app is opened and is unique per application. Using the `com.clueride` sets a "domain" which should avoid bumping into other apps.

Application Scheme
1 Player com.clueride.player
2 Ranger com.clueride.ranger

Tenant Domain

I'm experimenting to see if I can get away with a single Tenant domain that handles both Social and Passwordless. I may have split the two because of confusion over whether the user would choose between the two within my app, or once they got over to Auth0. Trying this out to see.

  • Support all apps (each app is distinguished by Custom URL scheme).
  • Choice between Social and Email/Passwordless happens Mobile App side rather than deferring to a choice presented by Auth0.
  • Each of the connections (not sure how this plays, but we want both Social and Passwordless (email).

Passwordless Configuration

Universal Login

  • To use the Email/Passwordless, we need to configure the Login screen under "Universal Login".

JWT Parsing issue

I'm having a problem decoding the middle part of the JWT token that is returned by the Passwordless signup. (Recorded as CI-28)

  • Appears to be a character that is not recognized (maybe the underscore?).
  • Had looked at HS256 vs RS256, but doesn't seem to be a factor.
  • Seems to be tied the particular account I was using. I tried another account and it popped right in with a well-formed JWT.
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License