-
Notifications
You must be signed in to change notification settings - Fork 581
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
Feat: Chess Mobile App with authentication #347
base: main
Are you sure you want to change the base?
Conversation
…into feat/mobile-app
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you tested this? does it work properly? can you provide any APK or testflight to test this?
import { db } from '../db'; | ||
import base64 from 'base-64'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not use JWT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can Use JWT also, but it'll be two times longer than base64 encode token and also it needs a secret too.
Can shift to JWT there's no problem
@@ -60,11 +63,29 @@ router.get( | |||
router.get( | |||
'/google/callback', | |||
passport.authenticate('google', { | |||
successRedirect: CLIENT_URL, | |||
// successRedirect: CLIENT_URL, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why we only comment this here and not on github or facebook too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only tested for google, I'll update it after testing for github and facebook
Yess I have tested it, let me find a way to provide a APK to test this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added github sign-in, not implemented facebook oauth as it has been removed
import { db } from '../db'; | ||
import base64 from 'base-64'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can Use JWT also, but it'll be two times longer than base64 encode token and also it needs a secret too.
Can shift to JWT there's no problem
lets go with jwt... also send an apk please |
Ohk I'll shift to jwt, and regarding apk, I am figuring out why it's not working in production but working perfectly fine in development mode |
@siinghd expo doesn't have jwt support as jwt requires node internal library crypto so I kept the base64 and made the apk For the time being I hosted web socket server and backend server to ec2 and postgres is running on neon db |
🎉 🎉 🎉 |
@ofcljaved thank you will test it later |
Lol |
This PR do this
https://youtu.be/-6WtZn5Zx0I
In order to have same backend for mobile and app, I added another callback which will capture the cookie and send it as query params for mobile and works exactly same for web
Full documentation is in README