• Resolved bikerflyeradmin

    (@bikerflyeradmin)


    Hello,

    Thank you for creating this plugin!

    I am developing a mobile app, and in one of the pages I have a webview to my site. In the app, the users login via firebase with email and password. I would like to append a JWT token to the webview load url that would auto login the user to the site since they must already be loggin into the app in order to get to the webview page. I have the integrate firebase plugin and users can login to my site with firebase credentials and visa-versa.

    Is this possible with this plugin?

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author nicu_m

    (@nicu_m)

    Hello,

    The main feature of this plugin is to automatically log in users into a WordPress website using a JWT.

    So, if you use the JWT generated in your app, you can log into WordPress.
    Just make sure you have the user created. Otherwise, in this plugin, you have an endpoint to create users.

    So, to answer your question, Yes, you can use this plugin if you have a valid JWT token generated for your users.

    PS: make sure you set the “Jwt Decryption key” from plugin configuration and this key matches the one that you have in your app.

    Let me know if you have any other questions and feel free to rate this plugin.

    Thank you.

    Thread Starter bikerflyeradmin

    (@bikerflyeradmin)

    Wow thank you for the quick response. What I do not understand is how to append a token that will know which user it is? And I don’t understand the plugins configurations. Is there any in depth guide on how to use the plugin other than the plugin description?

    Plugin Author nicu_m

    (@nicu_m)

    Unfortunately, the documentation website is still work in progress. I will update this plugin description with the website when it will be ready.

    As a quick hint, in the plugin configuration, you have to set:
    [General section]
    1. JWT Decryption key ( this is the key used in your app to generate the JWT). With this key, we will validate the JWT.
    2. Choose JWT Decryption algorithm ( the same one you used in your app)

    [Login Settings]
    1. please set “Allow Auto-login” to “yes”
    2. set parameter “Action” ( Login by WordPress User ID / User Email)
    3. set the JWT parameter key with the key from your JWT where user email or user ID can be found in the decoded JWT.

    After that, you can copy the sample URL from the top of the page ( Login Config section), replace the JWT string with your valid JWT and you will be redirected to your WordPress and automatically logged in.

    Let me know if you manage to make it work.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Auto Login from webview in mobile app’ is closed to new replies.