• tredstone

    tredstone

    2 years ago
    ok, i will try this and come back with more question when i get to that portion of work in the solution
  • r

    rp

    2 years ago
    Sure. I may also have a few questions to better understand your use case so that I can guide you better. As session management is a very important part of any app.
  • tredstone

    tredstone

    2 years ago
    no problem, send me a DM if you have any project specific questions
  • r

    rp

    2 years ago
    Sure.
  • tredstone

    tredstone

    2 years ago
    i noticed that the demo has 3 tables but the documentation says that the library will create two tables
  • tredstone

    tredstone

    2 years ago
    was the 'all_tokens' table specific to the demo?
  • tredstone

    tredstone

    2 years ago
    also, is there any documentation describing what algorithms are used for the request_tokens, and keys used to sign the access_tokens?
  • r

    rp

    2 years ago
    @tredstone , to answer your first question: The latest release on npm is 4.3.0, which requires just two tables. The master branch on the github repo is on version 5.0.0 which is not release yet and is being used by the demo website. That's why there is a difference in the number of tables. However, you can still see the demo website code for implementation reference.
  • r

    rp

    2 years ago
    to answer your second question: I assume you mean refresh_tokens and not request_tokens. There is no documentation for this part. If you are interested, i'd be happy to point out to you, the code section for this.
  • r

    rp

    2 years ago
    Code to generate a new signing key (to sign access tokens): [function at line 17]: https://github.com/supertokens/supertokens-node-mysql-ref-jwt/blob/v4.3.0/lib/ts/helpers/utils.ts Code to create and verify JWT access token given a signing key and JWT payload: https://github.com/supertokens/supertokens-node-mysql-ref-jwt/blob/v4.3.0/lib/ts/helpers/jwt.ts Code to encrypt and decrypt refresh tokens: [function at line 52 and line 92]: https://github.com/supertokens/supertokens-node-mysql-ref-jwt/blob/v4.3.0/lib/ts/helpers/utils.ts I hope this helps.