Skip to main content
5 votes
Accepted

OAuth2 Implementation

Second part first: In verify_token the return values are assigned - only to be immediately returned. I get that it might be nice in a debugger(?) but there's ...
ferada's user avatar
  • 11.1k
3 votes
Accepted

User registration and login service using JWT

Nice work, the code looks good! Couple of comments- With ES6 syntax, if you're returning an object with a property that is coming from a variable of the same name: ...
Lewis Farnworth's user avatar
3 votes
Accepted

PHP JWT management base library for inclusion in larger projects

The mb_strlen($configFileNameWithPath) > 0 checks don't need the > 0 part at the end. ...
mickmackusa's user avatar
  • 8,654
3 votes

JWT Authentication Service

It looks fine to me, I just a few minor suggestions. catch (Exception ex) { throw ex; } You probably left this in by accident, but you're better off without ...
Pierre Menard's user avatar
3 votes

Json Web Token-like implementation in Rust

Run clippy to be automatically told about things like: ...
Shepmaster's user avatar
  • 8,648
3 votes
Accepted

Generating public/private RSA key pair programmatically, using it for JWTs

There isn't too much to see here because the key generation simply relies on RSA.generate(2048), but I wonder why you would need this code as it is exceedingly ...
Maarten Bodewes's user avatar
2 votes

Simple login using ReactJS

No, you are re-rendering the application manually. ...
webdeb's user avatar
  • 528
2 votes
Accepted

Logging in with multiple types of info

Since this is the backend to a login request, I assume that you expect just 2 inputs, the password and one of the others. So why not use the following: ...
BeetleJuice's user avatar
2 votes

Code that checks whether there is a holiday by calling another microservice

Well... from what I've managed to understand, your code is designed to update the meeting status based on whether there is a holiday on the meeting date for either the originator or the participant. ...
Vladimir Kishlaly's user avatar
1 vote

Decrypt incoming HTTP request headers

I would suggest to merge the two middlewares into one to make the data flow more explicit. According to my understanding you want to achieve something like this: Decrypt the token If it can't be ...
Peter Csala's user avatar
  • 9,000
1 vote

Decrypt incoming HTTP request headers

I will not comment on the code. I just want to point out that this way you nullify some security that separate tokens provide. Specifically, it doesn't matter that you encrypted the pair, if I steal ...
slepic's user avatar
  • 5,477
1 vote

SSO login & authenticate Wordpress users with JWT token

I don't know why an iframe was suggested to you, but I do see some possibilities for vulnerability. For your platforms, I would validate server-2-server. Flow: If client claims to be logged in ( in ...
Neoan's user avatar
  • 29
1 vote
Accepted

Expiring JWT tokens in Flask

As far as I can tell, This looks like a pretty solid implementation of blacklisting. I can't see any obvious code mistakes. I you are worried about security it can be wise to check the ...
Ludisposed's user avatar
  • 11.5k
1 vote
Accepted

JWT authentication between Django and ReactJS

UX concern: refresh period I wonder if you are confusing the access token expiration setting (JWT_EXPIRATION_DELTA) with the refresh token expiration (...
Will Cain's user avatar
  • 126
1 vote
Accepted

Create annotation to validate JWT in Spring controller instead of filter

I'd prefer the filter, just because then you don't have to worry about a missed annotation leaving your API wide open. I never found decoding JWTs to be expensive, and I suspect you're performing ...
Eric Stein's user avatar
  • 6,514
1 vote

Spring JWT authentication using cookies

Well , I can give you some suggestions ( though debatable) Log levels has to be chosen properly. I see use of debug in all places. Actually, the info level is good enough to be used for simple texts ...
Krishnanunni's user avatar
1 vote

JWT Authentication for REST API

I can't be of much help with JWT, however if you are able to use es7 features, I would recommend utilising them. ...
August's user avatar
  • 225
1 vote

JWT Authentication for REST API

Though not in Javascript, my uses of JWT have always used the password as the JWT secret. The JWT payload is whatever you need to identify the user -- username in ...
D.Shawley's user avatar
  • 370

Only top scored, non community-wiki answers of a minimum length are eligible