Skip to content

Commit

Permalink
Adding LinkedIn Authentication
Browse files Browse the repository at this point in the history
  • Loading branch information
Ojas-Arora committed Jul 28, 2024
1 parent 74ae86d commit e4eac4d
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions log/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
<script src="https://www.gstatic.com/firebasejs/9.9.2/firebase-app-compat.js"></script>
<script src="https://www.gstatic.com/firebasejs/9.9.2/firebase-auth-compat.js"></script>
<script async defer crossorigin="anonymous" src="https://connect.facebook.net/en_US/sdk.js"></script>
<script src="https://cdn.rawgit.com/oauth-io/oauth-js/c5af4519/dist/oauth.js"></script>
<meta name="google-signin-client_id" content="646664380070-n07i34glgcc6sanb59p3m1k5k0cgn1v1.apps.googleusercontent.com">
<style>
.social-container {
Expand Down Expand Up @@ -189,10 +190,21 @@ <h1>Hello, Friend!</h1>
});
}

function handleLinkedInSignIn() {
// Placeholder function, implement LinkedIn sign-in here if necessary
window.location.href = "https://www.linkedin.com";
}
// Initialize OAuth.io
OAuth.initialize('your_oauth_io_public_key'); // Replace with your OAuth.io public key

// Handle LinkedIn Sign In
function handleLinkedInSignIn() {
OAuth.popup('linkedin').then(linkedin => {
console.log('LinkedIn token:', linkedin.access_token);
linkedin.me().then(data => {
console.log('LinkedIn user data:', data);
});
}).catch(error => {
console.error(error);
});
}


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

0 comments on commit e4eac4d

Please sign in to comment.