[Archive] Cannot distinguish login method using UserInfo.typeOfLogin

:classical_building: Archived Content from Web3Auth Community

This topic was originally posted by githubdiscussions on 9/28/2022.
This content has been migrated from our previous community forum to preserve valuable discussions.


typeOfLogin in UserInfo gives 'jwt' for both email_passwordless and kakao login.
I expect it to give me the same name I use for loginMethodsOrder.
I assume it is a bug, but if it is not, is there another way to know the login method user used?



Originally posted by: jisoo-3pm

Check the discussion at: https://github.com/orgs/Web3Auth/discussions/655

I think I could use aggregateVerifier instead for now and check if it includes the login method name.



Originally posted by: jisoo-3pm

Hey @jisoo-3pm

Sorry for the late reply here.

typeOfLogin in UserInfo also gives the name of the login used: "typeOfLogin": "google",

UserInfo response looks like this:

{
  "email": "john@gmail.com",
  "name": "John Dash",
  "profileImage": "https://lh3.googleusercontent.com/a/Ajjjsdsmdjmnm...",
  "aggregateVerifier": "tkey-google-lrc",
  "verifier": "torus",
  "verifierId": "john@gmail.com",
  "typeOfLogin": "google", // <--- is this what you need?
  "dappShare": "<24 words seed phrase>", 
  "idToken": "<jwtToken issued by Web3Auth>",
  "oAuthIdToken": "<jwtToken issued by OAuth Provider>", 
  "oAuthAccessToken": "<accessToken issued by OAuth Provider>"
}


Originally posted by: shahbaz17