DhanushNehru / CustomCodeEditor

A web-based tool that allows users to write, test, and execute code in various programming languages seamlessly
https://custom-code-editor.vercel.app/
Apache License 2.0
32 stars 39 forks source link

Added Github SignIn #139

Closed Anikesh02 closed 1 month ago

Anikesh02 commented 1 month ago

Resolves https://github.com/DhanushNehru/CustomCodeEditor/issues/15#issue-2302104982

PR Fixes:

Added GitHub Sign-In (Preview):

https://github.com/user-attachments/assets/8a79d957-d2b1-4f56-9518-523fd66a8d22

Setup:

  1. Go to Firebase console and add a new sign-in provider (GitHub)

image

  1. Now go to your GitHub page and find the settings option.

  2. Click on Developer settings in the bottom:

image

  1. In Developer settings go to OAuth Apps and create a New OAuth App

  2. Register your new OAuth App

image

  1. For Authorization callback URL you can go to firebase console and in the GitHub provider (Present in Edit configuration of your github provider) settings you'll find:

image

  1. After adding the Authorization callback URL simply click on Register Application.

  2. After successfully registering your OAuth App you'll be provided with a client ID and client secret key (Which you can generate by clicking on Generate New Client Secret.

  3. Copy the client ID and client secret key and paste it in firebase GitHub configuration:

image

  1. You're all set! Just make sure that if you've used your GitHub primary email for Google signing (If the database already has your email stored when you used Google sign-in, it will create an error. Kindly make sure to use either Google sign-in or GitHub sign-in for one particular email. Duplicate emails will raise an error as the user can log in only with one email with one sign-in provider.

@DhanushNehru Kindly assign this PR to me and add "hacktoberfest" and "hacktoberfest-accepted" label to this PR and the issue solved .

Thank you !!

vercel[bot] commented 1 month ago

@Anikesh02 is attempting to deploy a commit to the Dhanush Nehru's projects Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] commented 1 month ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
custom-code-editor ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 9, 2024 0:15am
Anikesh02 commented 1 month ago

@DhanushNehru Kindly review the PR and let me know if there's any change to be made and also please consider adding the labels. Thank you !!

DhanushNehru commented 1 month ago

Hi @Anikesh02 , looks good if you can please create an issue mentioning this PR, to update the Readme so that people who set things in local from now on might be helpful.

You can update the Readme or anyone else can update accordingly

Anikesh02 commented 1 month ago

Hi @Anikesh02 , looks good if you can please create an issue mentioning this PR, to update the Readme so that people who set things in local from now on might be helpful.

You can update the Readme or anyone else can update accordingly

Created an issue for documentation of GitHub auth