Vanilla login verification

Hello, I have some questions i wanted to ask

1) how can we retrieve all the emails of those users who have registered to our app through email/password
2) if a player wants to login using their gmail id  using email/password form which you can also call vanilla signup
	the email provided by the user, does nakama verifies whether r not the email id /account is already created by gmail before authenticating the email login procedure or not?

P.S. I am only using gmail as an example, the user can use any other type of email like Hotmail/yahoo etc

Thanks

@samuelrichards95 I’ll answer each question inline.

how can we retrieve all the emails of those users who have registered to our app through email/password

There’s no official Nakama API for this purpose but I assume that it’s an administrative use case so it’s quite easy to just write a simple SQL query for that info. A super quick example is:

SELECT id,username,email FROM users WHERE email IS NOT NULL OR email <> '';

You could even wrap that logic in a small RPC function that you’d call as a server to server (S2S) function call.

does nakama verify whether or not the email id/account is already created by gmail before authenticating the email login procedure or not?

No Nakama doesn’t look at whether the service that the account was linked from has an email field (i.e. Google or Facebook) and just maps the ID to the field in the database. This is different if the email account link option is used or the user is authenticated with that option because in that case the user has specifically supplied those credentials.

Hope this helps.