diff --git a/Github Login/Github.js b/Github Login/Github.js new file mode 100644 index 0000000..a2dd19b --- /dev/null +++ b/Github Login/Github.js @@ -0,0 +1,11 @@ +const githubLoginButton = document.getElementById("github-login-button"); + +githubLoginButton.addEventListener("click", () => { + const clientID = "9b422344fa31d0dfaa43"; + const redirectURI = "http://127.0.0.1:5500/GithubProfile.html"; + const scope = "read:user"; + + const githubAuthURL = `https://github.com/login/oauth/authorize?client_id=${clientID}&redirect_uri=${redirectURI}&scope=${scope}`; + + window.location.replace(githubAuthURL); +}); diff --git a/Github Login/GithubLogin.html b/Github Login/GithubLogin.html new file mode 100644 index 0000000..9d71f69 --- /dev/null +++ b/Github Login/GithubLogin.html @@ -0,0 +1,13 @@ + + + + + + + Github + + + + + + \ No newline at end of file diff --git a/Github Login/GithubProfile.html b/Github Login/GithubProfile.html new file mode 100644 index 0000000..01b419d --- /dev/null +++ b/Github Login/GithubProfile.html @@ -0,0 +1,78 @@ + + + + + + + Login Page + + +

Welcome to Github

+ + + + \ No newline at end of file