php-jwt
jwt-decode
php-jwt | jwt-decode | |
---|---|---|
16 | 4 | |
9,228 | 3,073 | |
0.3% | 0.7% | |
5.8 | 8.7 | |
about 1 month ago | 3 days ago | |
PHP | TypeScript | |
BSD 3-clause "New" or "Revised" License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
php-jwt
- firebase/php-jwt: PHP package for JWT
-
Understanding user authentication on web and API
So basically if the login is successfull I have to create a JWT token (with something like this library) with the userID inside and send it via `setcookie()` for web or in a JSON response to the API client and consider it the long lived refresh token.
-
What is the best way to implement in-app purchases without a third-party service?
This depends on the library you end up downloading for the platform of your choosing. Some of the parts I explained above will be handled by the library for example in my case I decoded signedTransactionInfo using firebase/php-jwt. This has the added benefit of always checking the validity of the signature which was omitted in the manual method.
- Why there's not a native way to work with JWT in Laravel?
-
How can I decode the header from the JWT?
https://github.com/firebase/php-jwt i use this one, its really good
- ElastiCache for Redis as session handler for ECS container...
- Weekly "ask anything" thread
-
API Tokens: A Tedious Survey
> Why all the hate for JWTs?
> Just pick a crypto scheme and the JWT is just an encoding that makes it easier to use.
That's not what JWT is, but I can understand why someone would be misled into believing that.
JWT isn't just an encoding format, it also includes a crypto algorithm negotiation protocol that lets the attacker choose the algorithm. Even if you strictly allow-list which algorithm you want to support, you can accidentally bypass this control in many libraries if you suppor the `kid` (key ID) header. [1]
It also allows attackers to completely strip the security. [2] [3]
Put shortly, JWT is a gun aimed directly at your foot. That's why there's so much hate for JWTs.
[1] https://github.com/firebase/php-jwt/issues/351
[2] https://paragonie.com/blog/2017/03/jwt-json-web-tokens-is-ba...
[3] https://www.howmanydayssinceajwtalgnonevuln.com/
- Firebase/PHP-JWT: New Risk of HS256/RSA256 Algorithm Confusion
- Possible security issue involving the Firebase JWT library for PHP (Algorithm Confusion with Key IDs)
jwt-decode
-
What is the best way to implement in-app purchases without a third-party service?
Now I should mention it's NOT recommended to do this manually. There are great libraries that can help (examples PHP/NodeJS). For the sake of completeness here's how you do it.
-
Angular auth oidc: Is there a way to I know how much time left until the current session get expired?
A JS library i found for decoding JWT: https://github.com/auth0/jwt-decode
-
Create an Electron desktop app version of jwt.io
https://github.com/auth0/jwt-decode Again, thanks the developers.
-
Get Kontent Project ID from the Management API key
To do all of that, the code would end up looking like that (or any other language alternative) - or you just use a library like jwt-decode. But it is always good to know what they do.
What are some alternatives?
PHP OAuth 2.0 Server - A spec compliant, secure by default PHP OAuth 2.0 Server
next-auth - Authentication for the Web.
Ratchet - Asynchronous WebSocket server
electron-vue - An Electron & Vue.js quick start boilerplate with vue-cli scaffolding, common Vue plugins, electron-packager/electron-builder, unit/e2e testing, vue-devtools, and webpack.
Fast Route - Fast request router for PHP
angular-auth-oidc-client - npm package for OpenID Connect, OAuth Code Flow with PKCE, Refresh tokens, Implicit Flow
fusionauth-jwt - A simple to use Java 8 JWT Library. Verify, Sign, Encode, Decode all day.
cloudfront-auth - An AWS CloudFront Lambda@Edge function to authenticate requests using Google Apps, Microsoft, Auth0, OKTA, and GitHub login
paseto - Platform-Agnostic Security Tokens
jose - JWA, JWS, JWE, JWT, JWK, JWKS for Node.js, Browser, Cloudflare Workers, Deno, Bun, and other Web-interoperable runtimes.
Halite - High-level cryptography interface powered by libsodium
frank_jwt - JSON Web Token implementation in Rust.