jonathan-dejong / simple-jwt-authentication

Extends the WP REST API using JSON Web Tokens Authentication as an authentication method.
GNU General Public License v3.0
87 stars 25 forks source link

Login only with email? (required this to implement social login on mobile apps) #70

Open gtu-myowin opened 2 years ago

gtu-myowin commented 2 years ago

Hi, I came here from https://github.com/Tmeister/wp-api-jwt-auth and I have installed your plugin https://wordpress.org/plugins/simple-jwt-login/

I am trying to implement social logins (Facebook, Google, Twitter, LinkedIn & Apple) for my Flutter mobile apps backed by WordPress. I wonder

  1. if it is possible to login with email only and get JWT token with this plugin because I will get only name & email from social sites. Even if I have register user with random password, they will still use social login in future and email is the only reliable data I would get from social sites.
  2. or since WordPress has the ability to get user by email & login without password, I can do that by registering a custom endpoint but how do I get or generate JWT token in this method for future authentication?

Thank you for your effort on the great plugin and supporting.