Navigation

    FusionAuth
    • Login
    • Search
    • Home
    • Categories
    • Recent
    • Popular
    • Pricing
    • Contact us
    • Docs
    1. Home
    2. Tags
    3. login-api
    Log in to post
    • All categories
    • S

      UNSOLVED Error 404 when trying to login using access token
      Q&A • token php login-api • • seednextsrl

      2
      0
      Votes
      2
      Posts
      45
      Views

      dan

      @seednextsrl you typically don't use the access token as a login password.

      The access token is what you present to other applications as proof that someone has logged in.

      There are a few FusionAuth APIs you can call and present the access token as a means of authentication. They are marked with a little blue person.

      Here's more about API authentication: https://fusionauth.io/docs/v1/tech/apis/authentication

      Here's an example of an API which uses a JWT to authenticate: https://fusionauth.io/docs/v1/tech/apis/users#retrieve-a-user (scroll to the "Retrieve a User using a JWT" section).

    • dan

      Refresh token permissions
      Q&A • refresh token login-api oauth • • dan

      2
      0
      Votes
      2
      Posts
      91
      Views

      dan

      There are two “worlds”, OAuth, and API only.

      API world (JSON in body, proprietary to FusionAuth):

      Application > Security > Login API Settings > Generate Refresh Tokens (Generate a a refresh token when using the Login API) Application > Security > Login API Settings > Enable JWT refresh (Allow a JWT to be refreshed using the /api/jwt/refresh API)

      OAuth world (form params, in body and in request, standardized):

      Application > OAuth > Generate Refresh Tokens (Generate a refresh token if offline_access scope was requested) Application > OAuth > Enabled Grants > Refresh Token (Allow a JWT to be refreshed using an refresh token) (edited)

      If you are living in the OAuth world, then you can disable the API access, and just use the OAuth configuration. And vice versa.

    • dan

      UNSOLVED I'm seeing a "cannot deserialize value of type ‘java.util.uuid’ from string" error when posting to /api/login
      Q&A • uuid login-api • • dan

      2
      0
      Votes
      2
      Posts
      1361
      Views

      dan

      It looks like the uuid isn't being sent as a string. Per https://fusionauth.io/docs/v1/tech/reference/data-types#uuids it should be quoted.

      So you want to send:

      { "applicationId": "15e45e7d-3e34-43df-9366-91c66a8cc9ae", "loginId": "myuserid", "password": "mypassword" }
    • dan

      SOLVED I am using the login API but I'm not getting a refresh token. Why?
      Q&A • login login-api refresh token • • dan

      2
      0
      Votes
      2
      Posts
      72
      Views

      dan

      My guess is you are missing the applicationId on the login API request.

      A refresh token is per user per application, so passing that is required to provide refresh tokens (even though it is optional for the call to succeed).