FusionAuth
    • Home
    • Categories
    • Recent
    • Popular
    • Pricing
    • Contact us
    • Docs
    • Login

    Does api/logout revoke the bearer/refresh token?

    Scheduled Pinned Locked Moved
    Q&A
    0
    4
    2.3k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • joshuaJ
      joshua
      last edited by

      Does api/logout revoke the bearer/refresh token?

      https://fusionauth.io/docs/v1/tech/apis/login/#logout-a-user

      1 Reply Last reply Reply Quote 0
      • joshuaJ
        joshua
        last edited by

        The short answer is no, it does not.

        1 Reply Last reply Reply Quote 0
        • T
          twilkinson
          last edited by

          The link you mention in your first post (https://fusionauth.io/docs/v1/tech/apis/login/#logout-a-user) has the following paragraph.

          "The refresh token is only revoked if the request contains the refresh_token cookie or the refreshToken request parameter."

          Does that not mean that, if you supply the refreshToken request parameter, then logout will revoke it?

          1 Reply Last reply Reply Quote 0
          • joshuaJ
            joshua
            last edited by

            @twilkinson,

            Hello again!

            Yes, this is how I read that as well from the documentation. You could also test that logout is enforcing the behavior that you are seeking by using the browser console to check for cookies. Or if not storing the token in cookies, checking the relevant location and/or behavior to ensure that the user's refresh/access tokens are properly removed/invalidated.

            Based on the documentation, you should provide the refreshToken in the request to invalidate, as seen below:

            6805586d-d207-4358-b4a1-97b62b5e0453-image.png

            Thanks,
            Josh

             

            Related Links

            https://fusionauth.io/community/forum/topic/270/logout-questions/5

            1 Reply Last reply Reply Quote 0
            • First post
              Last post