Skip to content

Commit

Permalink
Merge pull request Anishkagupta04#1074 from Ojas-Arora/dev
Browse files Browse the repository at this point in the history
Adding Github Authentication
  • Loading branch information
varshith257 authored Jul 31, 2024
2 parents 2f01207 + ad611d4 commit abd17e2
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions log/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ <h1>RAPIDOC</h1>
<button type="submit">Register</button>
<span id="registerMessage" style="display: none;">Account created successfully</span>
<div class="social-container">
<div onClick="handleGitHubSignIn()" class="social-icon">
<i class="lni lni-github-original" style="color: #333;"></i>
</div>
<div onClick="handleMicrosoftSignIn()" class="social-icon">
<i class="lni lni-microsoft" style="color: #00a2ed;"></i>
</div>
Expand Down Expand Up @@ -103,6 +106,9 @@ <h1>RAPIDOC</h1>
<button type="submit">Login</button>
<span id="loginMessage" style="display: none;">Login successful</span>
<div class="social-container">
<div onClick="handleGitHubSignIn()" class="social-icon">
<i class="lni lni-github-original" style="color: #333;"></i>
</div>
<div onClick="handleMicrosoftSignIn()" class="social-icon">
<i class="lni lni-microsoft" style="color: #00a2ed;"></i>
</div>
Expand Down Expand Up @@ -228,6 +234,18 @@ <h1>Hello, Friend!</h1>
});
}

function handleGitHubSignIn() {
const provider = new firebase.auth.GithubAuthProvider();
auth.signInWithPopup(provider)
.then((result) => {
console.log(result);
})
.catch((error) => {
console.error(error);
});
}



document.querySelectorAll('.toggle-password').forEach(item => {
item.addEventListener('click', function() {
Expand Down

0 comments on commit abd17e2

Please sign in to comment.