Category "jwt"

How to get user JWT token in JWTStrategy (NestJS)?

My problem is that I want to check if the login token is invalidated in the database (after changing password). However, the validate function in JWTStrategy on

How to extract token string from Bearer token?

For example I have following Bearer JWT in my header, what's a elegant way to extract the token itself? Basically anything after Bearer. Since this could be in

Why is auth0 recommending not to store tokens in localStorage?

Auth0 provide extensive list of resources describing best practices for the authentication. Among them there's a constant stream of advice not to use localStora

Is it possible to configure Keycloak to store the access-token/JWT as a Bearer Token instead of as a Cookie?

My understanding (which may be incorrect) of Keycloak is that once an User has logged in and is authenticated, the access-token/JWT is then stored as a cookie i

express-jwt got TypeError: express_jwt__WEBPACK_IMPORTED_MODULE_2___default(...) is not a function

The following code works fine for [email protected], but got TypeError for [email protected] import expressJwt from 'express-jwt' const requireSignin = express

"Expected a string value" on login using Django REST and pyjwt

So, I'm trying to build simple register and login functionalities into my API. I can register just fine, but when I insert the user details on the login API vie

C# - Two-Factor Authentication (without ASP.NET Core Identity)

Is it possible to implement a two-factor authentication without use ASP.NET Core Identity? I have my own login table and everything works fine with login + pass

returns 403(forbidden) when using authentication scheme in .net core

I am doing authentication in my web application with JWT Security Tokens and a custom authentication scheme. I'm generating tokens when a user login I created

Unable To Install Simple JWT in my Django Project

Here's my setup right now: Pip Freeze: asgiref==3.3.1 Django==3.0 djangorestframework==3.10.0 djangorestframework-simplejwt==4.6.0 PyJWT==2.0.1 pytz==2021.1 sql

React Native: How to remove token with AsyncStorage with JWT ?

I am currently storing my React Native token like so using var jwt = require('jsonwebtoken');: AsyncStorage.setItem('token', response.token) And I'm not sur

How to reset Laravel AuthManager/guards in between API calls in tests?

I'm writing a Feature test for an API and I want to test custom auth logic. I know that when I call the login API endpoint, Laravel caches the fact that the use

SignalR hub with Bearer authentication

I have a problem. I have in my API JWT Bearer authentication. I try to use SignalR hub with authentication but it doesn't work for me. I think I tried everythin

JWT "invalid_grant" in Signature in Google OAuth2

I am writing some code to try to get a token to use from Google in OAuth2. This is for a service account, so the instructions are here: https://developers.goo

Mixed named and unnamed function parameters

I have this function for authenticating JWT tokens (not middleware), which says: package main import ( "net/http" "log" "fmt" "github.com/dgrijalva/jwt-go" )

Invalid Token Error: Invalid token specified: Cannot read property 'replace' of undefined?

I was trying to decode token created through jwt, so that I can access values in my react page and and use it.But for some reason it shows "InvalidTokenError: I

jwt.verify not throwing error for expired tokens

I'm using JWT - jsonwebtokens in Nodejs. I'm creating a token and want to throw an error if the token expires. My token is created successfully and I'm checking

Strapi JWT token lifetime?

I can't find any information about JWT token lifetime, how long in will be valid on Strapi CMS? And how i can automatically refresh the token when it will be no

Authorization header in img src link

I have an api that uses jwt for authencation. I am using this api for a vuejs app. I am trying to display an image in the app using <img src="my/api/link"

Symfony 6 - lexik JWT - Authenticator does not support the request

I'm having some problems with lexik JWT bundle and Symfony 6.0, for swagger I use NelmioApiDocBundle. The thing is, that every in swagger works before I decide

Is Basic Authentication a Session based authentication and why Jwt is more recommended?

I'm learning about Basic Authentication and Jwt Authentication with Java and Spring and I want to ask you if basic authentication is a session based authenticat