Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

token.type missing #1856

Open
4 of 5 tasks
smonkey72 opened this issue Oct 12, 2023 · 0 comments
Open
4 of 5 tasks

token.type missing #1856

smonkey72 opened this issue Oct 12, 2023 · 0 comments
Labels

Comments

@smonkey72
Copy link

Version

module: 5.0.0-1667386184.dfbbb54
nuxt: 2.15.7

Nuxt configuration

mode:

  • universal
  • spa

Nuxt configuration

	auth: {
		strategies: {
			local: {
				token: {
					type: 'Bearer',
					global: true,
				},
				endpoints: {
					login: {
						url: '/api/auth/login',
						method: 'post',
					},
					user: false,
				},
			},
		},
	  },

Reproduction

Login with a basic local token based schema like above with global set to true (default). Look at any axio request. The Authorization Header misses the token.type (default Bearer).

Disable SSR and do the same: token.type is provided on Auth-Header.

What is expected?

Token.type should be provided even with ssr and without.

What is actually happening?

Token.type is only provided with ssr disabled.

Steps to reproduce

See Reproduction.

Additional information

Happens only in @nuxtjs/auth-next. 4.x works fine even with ssr enabled.

Checklist

  • I have tested with the latest Nuxt version and the issue still occurs
  • I have tested with the latest module version and the issue still occurs
  • I have searched the issue tracker and this issue hasn't been reported yet

Steps to reproduce

What is expected?

What is actually happening?

Performance analysis?

@smonkey72 smonkey72 added the bug label Oct 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant