mycoralhealth / mycoral-patient

Mobile app for patients to interact with Coral Health blockchain
17 stars 7 forks source link

Login flow refinements #41

Closed lukecyca closed 6 years ago

lukecyca commented 6 years ago

The authentication is clunky. I'm going to go over what we can improve and what we have to live with (until we eject from Expo/CRNA).

1. "Expo" wants to use "expo.io" to Sign In

We can't get rid of this message unless we get rid of the whole web-base AuthSession and try to implement authentication from scratch.

We can change the two articles in the warning though. The warning would be nicer if it said "Coral Health" wants to use "login.mycoralhealth.com" to Sign In.

"Expo" is the name of the app. Since our app runs inside the Expo app, iOS considers Expo to be the app. If we run exp build:ios and submit to the app store, the resulting published app would have a name of our choosing.

"expo.io" is the hostname of the web app we're sending the user to. Expo.io operates a redirection service, and that's what's being used here. It is apparently possible for us to run our own, at our own domain.

2. The app at "exp://... is asking you to sign into another service

This warning only appears for unpublished Expo apps that we're running at various development URIs like exp://localhost:19000. Details

3. The Auth0 login screen

This is the login page as served by Auth0. I uploaded our logo but for some reason it still shows the Auth0 logo here.

In any case, it's possible to completely customize the login screen, which we should do so we have consistent colours, etc.

4. Screen transitions

There are brief flashes of screens that appear during the flow, which looks messy. We should be able to fix these simply by hiding UI elements at the appropriate time.

lukecyca commented 6 years ago

I've applied some branding to the Auth0 page, to the extent that is possible by configuring the Auth0 Lock widget.

Unfortunately the URL will remain mycoralhealth.auth0.com unless we switch to a paid plan, at which point we could configure a custom domain like login.mycoralhealth.com.

lukecyca commented 6 years ago
  1. Too much effort - not worth it
  2. This is only an issue for development - non-issue
  3. This has been done
  4. This has been done

Closing