Giter Club home page Giter Club logo

Comments (3)

br41nslug avatar br41nslug commented on September 27, 2024 1

This is currently only explicitly mentioned in the SDK reference https://docs.directus.io/packages/@directus/sdk/auth/functions/authentication.html#parameters, the referred link is the http api reference which does contain sdk usage examples for the corresponding http api call but is not a reference for the SDK itself.

Having said that i will do a small docs tweak to explicitly use 'json' in the example.

from directus.

br41nslug avatar br41nslug commented on September 27, 2024

As described in the response description:

Note: if you used cookie as the mode in the request, the refresh token won't be returned in the JSON.

The SDK defaults to cookie mode (it is the HTTP API itself referred to as defaulting to json not the new sdk) so the refresh_token is stored in a cookie instead of returned in the API response in this example.

from directus.

Andersang avatar Andersang commented on September 27, 2024

It seems like it was not stated in the docs that the Directus SDK defaults to 'cookie' mode. I had assumed that 'json' mode was the default considering the API documentation mentioning so:

'mode'
Whether to retrieve the refresh token in the JSON response, or in a 'httpOnly' 'secure' cookie. One of 'json', 'cookie'. Defaults to 'json'.

from directus.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.