Skip to content

feat: add Google and Microsoft OAuth authentication for login and signup - #265

Open
SriTanyaG wants to merge 6 commits into
AditiGupta-tech:mainfrom
SriTanyaG:sritanya/oauth-integration
Open

feat: add Google and Microsoft OAuth authentication for login and signup#265
SriTanyaG wants to merge 6 commits into
AditiGupta-tech:mainfrom
SriTanyaG:sritanya/oauth-integration

Conversation

@SriTanyaG

@SriTanyaG SriTanyaG commented Sep 19, 2025

Copy link
Copy Markdown

Feature: Add Google and Microsoft OAuth authentication

Description

This PR adds third-party authentication buttons using Google and Microsoft (Azure AD) on the login and signup pages. Users can now initiate OAuth flows to sign in using their existing accounts.

Changes

  • Added "Continue with Google" and "Continue with Microsoft" buttons on Login and Signup pages.
  • Integrated next-auth frontend signIn calls for OAuth flow.
  • Updated README with OAuth setup instructions and callback URLs.

Testing

  • Manual testing of OAuth buttons on frontend to ensure the sign-in flow initiates correctly.

Issue

Fixes #190

@vercel

vercel Bot commented Sep 19, 2025

Copy link
Copy Markdown

@SriTanyaG is attempting to deploy a commit to the AG21's projects Team on Vercel.

A member of the Team first needs to authorize it.

@vercel

vercel Bot commented Sep 19, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
neonest Ready Ready Preview Comment Sep 27, 2025 7:40pm

@AditiGupta-tech

Copy link
Copy Markdown
Owner

hey, kindly update your PR by updating the yaml file so i can review it.
image

@SriTanyaG

SriTanyaG commented Sep 20, 2025

Copy link
Copy Markdown
Author

@AditiGupta-tech I have updated the pnpm-lock.yaml file to include the new dependencies (@next-auth/mongodb-adapter). The branch is now up to date. Please let me know if any further changes are needed.

@AditiGupta-tech

Copy link
Copy Markdown
Owner

Why's this error coming?
image

@SriTanyaG

SriTanyaG commented Sep 20, 2025

Copy link
Copy Markdown
Author

The server error that shows up on the NextAuth page is happening because the authentication providers (Google and Microsoft) require environment variables to be set. For security reasons, I did not commit my .env.local file with actual keys.

To help others set it up, I have now added the necessary variables to the .env.example file. Anyone running the project locally will need to copy this file into a new .env.local and fill in their own keys. I added this setup instructions in the readme.

Please let me know if you would like me to share the test keys securely for easier verification, or if you prefer to use your own credentials.

@AditiGupta-tech

AditiGupta-tech commented Sep 20, 2025 via email

Copy link
Copy Markdown
Owner

@SriTanyaG

Copy link
Copy Markdown
Author

I have made the changes to the Google and Microsoft login buttons. The buttons now include spacing at the top, provider icons, a subtle hover effect consistent with the other form fields, and a loading spinner to indicate redirection.

Please let me know if the implementation aligns with your expectations or if any further adjustments are needed.I will also DM you the keys on LinkedIn for testing purposes.

image image

@SriTanyaG

Copy link
Copy Markdown
Author

I wasn’t able to message you directly on LinkedIn, so I’ve sent you an email instead with the environment variable keys for testing the Google and Microsoft authentication setup. Please check your inbox and let me know if you received it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Third-Party authentication for Login and Register with Google and Microsoft accounts

2 participants