Open jenyyy4 opened 1 month ago
@nfoert I would like to work on this issue, please assign it to me.
@nfoert I would like this issue to be assiged to me. Regards
Backend: Implement backend logic to handle the authentication flow. Use the token provided by Google to verify the user's identity and sign them in. Example of verifying the Google token on the server (Node.js example):
const {OAuth2Client} = require('google-auth-library');
const client = new OAuth2Client(CLIENT_ID);
async function verify(token) {
const ticket = await client.verifyIdToken({
idToken: token,
audience: CLIENT_ID,
});
const payload = ticket.getPayload();
const userid = payload['sub'];
}
Backend is written in Python/Django not JavaScript :)
This is a very good idea, I had this planned for future implementation but haven't gotten to it yet. Ideally this could also support "Sign in with GitHub", especially because this project is open source and the intended audience may already have a GitHub account This could also be used to get data and determine if the user is a contributor or supporter and add some kind of cosmetic badge in future, but that's an idea for another day.
I will be assigning this issue to @jenyyy4 as they are the one who created this issue first. Thanks for your interest in Cardie!
Additionally, there's already been some discussion on how this could be implemented in #57 which is a duplicate issue.
Feature Request: Add "Sign in with Google" Button
Summary
Request to integrate Google Sign-In functionality by adding a "Sign in with Google" button to allow users to quickly and securely authenticate using their Google account.
Motivation
Adding a "Sign in with Google" button would:
Use Cases
Proposed Solution
The "Sign in with Google" button should be integrated into the existing login page or modal. The button would allow users to authenticate with their Google accounts via the OAuth 2.0 protocol.
Steps to Implement:
Google Developer Console Setup:
Frontend:
Backend:
Example of verifying the Google token on the server (Node.js example):
UI Design:
Error Handling: