Skip to content

Add Middleware Step configuration #4

New issue

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,12 @@ View [samples](./samples) folder for more specific examples
```

You can get your token here (https://firebase.google.com/docs/auth/admin/verify-id-tokens) from the client SDK.

```js
app.use( require("firebase-auth-express-middleware") )
``

2. When requesting, and token is valid, you can get the `user` object from request
3. When requesting, and token is valid, you can get the `user` object from request
```js
router.get('/api/example', (req, res) => res.send(`You're logged in as ${req.authenticatedUser.email} with Firebase UID: ${req.authenticatedUser.uid}`));
```
Expand All @@ -45,4 +49,4 @@ View [samples](./samples) folder for more specific examples
## License and Author
This project is made available under MIT © LICENSE
Author(s):
- [JJ](https://github.com/Jaimeloeuf)
- [JJ](https://github.com/Jaimeloeuf)