Support » Plugin: Simple JWT Login - Login and Register to WordPress using JWT » Consent prompt to return JWT before autologin

  • Resolved mindflurry

    (@mindflurry)


    We are trying to find a solution to interconnect an application to wordpress / woocommerce account.
    Our application must open a webview of the woocommerce user account without asking to login all the time.
    To answer our problem, we would like to store a JWT token without any expiration. And on the first login we would like the user to enter his user / password on the webview and then having a consent prompt to validate the connection.
    Is your plugin can manage this problem or is there a way to set it up easily ?

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

    (@nicu_m)

    Hello @mindflurry,

    You can easily generate a new JWT in the plugin authentication endpoint.
    If you don’t set the exp parameter, then the JWT will never expire.

    If you want to make a JWT invalid, you will have to call the revoke endpoint.

    After you have the JWT, you can always log in your users via the autologin endpoint.

    Here are some links to the documentation:
    https://docs.simplejwtlogin.com/#/?id=authenticate-user
    https://docs.simplejwtlogin.com/#/?id=login-user

    Please let me know if you have other questions.

    Best regards,
    Nicu.

    Thread Starter mindflurry

    (@mindflurry)

    Hello,

    Thanks for your reply @nicu_m

    It’s perfect for the JWT expiration and autologin. But do you have a solution to manage the connection with wordpress login page and consent prompt (not directly with rest apis) before returning the JWT ?

    Plugin Author nicu_m

    (@nicu_m)

    Hello @mindflurry,

    I am not sure I’ve understood correctly, but I will try to give you an answer.

    You can use the Authenticate route from this plugin, in order to obtain the JWT.
    In your application just create a form with email and password and it should work.

    The user will provide the credentials, and you send them to this endpoint. The response will give a JWT, and you will be able to log in the user directly.

    Please let me know if this answer is clear for you.

    Best regards,
    Nicu.

    Hi, i have purchased the Rekord theme, is it possible you can email this plugin, i have hired a developer and he cannot finish without it

    thank you
    eh4517@yahoo.com

    Plugin Author nicu_m

    (@nicu_m)

    Hello @woodtown,

    You can download the plugin from Github: https://github.com/nicumicle/simple-jwt-login/tree/master/download

    Currently, the plugin is under a security review by the WordPress Plugin team, and I hope this week will be available to be downloaded from wordpress.org also.

    PS: If you like this plugin, and you have time, please don’t forget to rate it. This will help spreading the word about it. Thank you in advance.

    Best regards,
    Nicu.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Consent prompt to return JWT before autologin’ is closed to new replies.