https://github.com/dontlaugh/auth0-rocket-rust-example
Rocket app that authenticates users with Auth0
https://github.com/dontlaugh/auth0-rocket-rust-example
auth0 jwt maud rocket-rs sled
Last synced: 2 days ago
JSON representation
Rocket app that authenticates users with Auth0
- Host: GitHub
- URL: https://github.com/dontlaugh/auth0-rocket-rust-example
- Owner: dontlaugh
- Created: 2018-05-06T23:41:56.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-08-11T15:07:37.000Z (over 5 years ago)
- Last Synced: 2025-04-20T15:00:06.251Z (5 days ago)
- Topics: auth0, jwt, maud, rocket-rs, sled
- Language: Rust
- Homepage:
- Size: 98.6 KB
- Stars: 40
- Watchers: 0
- Forks: 11
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## OAuth with Rocket + Auth0
A basic app that integrates with Auth0.
### Configuration
Copy the example Rocket.toml file
```
cp Rocket.toml.example Rocket.toml
```Edit the `client_id`, `redirect_uri`, and `auth0_domain` with your own values.
If you want to use tls, run our provided script to create certs (needs Go installed)
```
./generate-cert.sh
```You must **also** set `AUTH0_CLIENT_SECRET` in your environment. We use an env
var to avoid leaking our secret key to the console during startup.All values should be available from from [Auth0's management console](https://manage.auth0.com/)
for your application.## Helpful Docs from Auth0
* https://auth0.com/docs/application-auth/current/server-side-web
* https://auth0.com/docs/jwt
* https://auth0.com/docs/api-auth/tutorials/verify-access-token#validate-the-claims
* https://auth0.com/docs/jwks#verifying-a-jwt-using-the-jwks-endpoint
* https://auth0.com/docs/tokens/id-token#verify-the-signature
* https://auth0.com/blog/cookies-vs-tokens-definitive-guide/