Skip to content
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

Validate token using Firebase Admin #94

Open
mazipan opened this issue Oct 16, 2023 · 0 comments
Open

Validate token using Firebase Admin #94

mazipan opened this issue Oct 16, 2023 · 0 comments

Comments

@mazipan
Copy link
Owner

mazipan commented Oct 16, 2023

Is your feature request related to a problem? Please describe.
Currently we save the session info in Notion, notion API is slow, so the checking becomes slow also.

Migrate the session checker to the built-in by using Firebase Admin in the server.

Describe the solution you'd like
https://firebase.google.com/docs/auth/admin/verify-id-tokens?hl=id#web

Additional context
Should applied on all private endpoints.

kodiakhq bot pushed a commit that referenced this issue Oct 24, 2023
Half-Closes (#94)

## Description

Tested some endpoints only 🤞🏻 
```
HTTP Requests
-------------

GET   /api/private/user/by-uuid/***                   200 OK
PATCH /api/private/user/update                        200 OK
POST  /api/private/user/slug-checker/***              200 OK
GET   /api/private/question/by-uid/pagination/***     200 OK
```
## Current Tasks

<!-- (Optional) List the tasks that you're planning to do in this PR.
This is to indicate how much you have been progressing before this PR is ready for review -->

- [x] Verify Id Token 
- [ ] Revoke Refresh Tokens on Session-Destroy ~_It requires `GOOGLE_APPLICATION_CREDENTIALS`. Will be on separate PR._
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant