We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I have a mysql table like this:
CREATE TABLE IF NOT EXISTS auth ( id BINARY(16) PRIMARY KEY);
And create a binary UUID like following within my NodeJS application:
user_id = id: <Buffer 11 ed cd 15 15 37 82 00 bf fe a5 5d 53 c7 95 d9>
Then use an insert statement to put the new user inside the table and sign a json web token as follows:
const jwt = jwt.sign( {user_id : user_id}, process.env.JWT_KEY!, { expiresIn: process.env.JWT_EXPIRES_IN, } );
But at the front end when I try to extract user_id from the given token using the following code:
user_id
final responseData = json.decode(response.body); if (responseData['error'] != null) { throw HttpException(responseData['error']['message']); } _token = responseData['token']; Map<String, dynamic> decodedToken = JwtDecoder.decode(_token!);
I see something like below when I print out decodedToken:
decodedToken
{type: Buffer, data: [17, 237, 205, 21, 21, 55, 130, 0, 191, 254, 165, 93, 83, 199, 149, 217]}
Why this happens and how can I fix it?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I have a mysql table like this:
And create a binary UUID like following within my NodeJS application:
Then use an insert statement to put the new user inside the table and sign a json web token as follows:
But at the front end when I try to extract
user_id
from the given token using the following code:I see something like below when I print out
decodedToken
:Why this happens and how can I fix it?
The text was updated successfully, but these errors were encountered: