openid/OpenYOLO-Android

Helper method to find out is any supported provider available?

riyaz opened this issue · 3 comments

riyaz commented

is there any helper method available to find out if there is any provider installed?

My flow is simple, as soon as user visits the login screen based on this helper method i can add a additional button of login using password manager this is similar to how google or facebook login works.

I don't prefer auto-login, 1. since its initial stage i don't want users to push to this flow, 2. its better to give this as advanced option

I can create a helper method using providers in org.openyolo.api.internal.KnownProviders and use package manager to resolve the intent, is it recommended or am i missing something?

is there any helper method available to find out if there is any provider installed?

No not at the moment.

My flow is simple, as soon as user visits the login screen based on this helper method i can add a additional button of login using password manager this is similar to how google or facebook login works. I don't prefer auto-login, 1. since its initial stage i don't want users to push to this flow, 2. its better to give this as advanced option

There may be a good reason to offer a button UX for some of these flows, but I disagree that auto sign-in and assisted account creation should be replaced with the button UX. Showing a user the typical "sign-in"/"sign up" screen is something we should strive to avoid. It requires a lot of user and developer effort. For example it requires the user to 1) remember if they have an account, 2) which authentication method they used (e.g. Facebook, Google, or user name or password), 3) specifics of the authentication method (e.g. Which Google account, or the correct user name and password). These problems are magnified for the user if the developer doesn't support account merging (e.g. the user clicks the wrong authentication methods and ends up with two accounts) or an identity first flow that kicks the user between account creation and account sign-in (e.g. user progresses through the account creation and it is discovered the account exists and is forced to redo the work).

Please check out these case studies for SmartLock for Passwords. They offer some compelling data from apps that utilize these sign-in and assisted sign-up patterns.

I can create a helper method using providers in org.openyolo.api.internal.KnownProviders and use package manager to resolve the intent, is it recommended or am i missing something?

You can see how it is done inside the CredentialClient and CredentialRetrieveActivity, but I would advise against it. I would advocate for the use case to be built out into this library over adding helper methods. My motivation being that this community can help avoid pitfalls and offer an overall simpler solution to developers.

Could you describe the use case a bit more? Right now I am imagining something like a "Continue w/ " button that would try to do sign-in auto sign-in and fallback to assisted account creation?

riyaz commented

I use smart lock for apps and I prefer auto-sign using smart lock, its seamless and non-intrusive.

I personally use 1password and smartlock is already setup,

  1. so as soon as i open the app i get a bottom sheet asking to pick smart lock or 1password using 'Use account from' dialog
  2. I pick 1password
  3. it asks me to authenticate using fingerprint or master password
  4. now its asking me to pick the account (even though i have only one account)

Now if you see, its a 4 step process for 1password, i understand it differs from provider to provider but still its not as seemless as smart lock.

I don't prefer putting user to these flow unless he intends to use yolo for login.

If yolo flow is like google smart lock then i would prefer auto-login ofcourse, ie as soon as i open the app without any user's input it should be able to pick the account as default and allow him to change the provider if he intends to.

Maybe yolo can store the last saved provider and other preferences using android's auto backup, so when he reinstall the app and if the same provider is already installed and setup we should be able to skip some authentication and make it seem-less, this will work like magic, until then i prefer manual way.

This repo is being archived. Closing issue.