nuxt-community / auth-module

Zero-boilerplate authentication support for Nuxt 2
https://auth.nuxtjs.org
MIT License
1.93k stars 924 forks source link

Token Type is not well documented on website and you have to use other property to see changes. #1821

Open wibrvallejoma opened 1 year ago

wibrvallejoma commented 1 year ago

Version

module: nuxt:

Nuxt configuration

mode:

Nuxt configuration

Reproduction

:warning: without a minimal reproduction we won't be able to look into your issue

What is expected?

What is actually happening?

Documentation for Nuxt Auth is completely wrong. In the website it says that you have to configure the following

  auth: {
    strategies: {
      local: {
        token: {
          required: true,
          global: true,
         type: 'Bearer'
        },

But if you want to change Bearer to Token or JWT it does not work at all... And under the documentation it does not say how to add different values, it only shows the "default" value. I have to deep dive to the issue going to the installed library and do the following;

  auth: {
    strategies: {
      local: {
        tokenType: 'JWT',

Why would you add a property called tokenType if you already have the property token.type? Also, the documentation does not have any information about this.

Steps to reproduce

Just use the configuration that I'm using and you will see that "options" truly change with my solution

Additional information

Checklist

Steps to reproduce

What is expected?

What is actually happening?

Performance analysis?