Skip to content

Commit 8b579f1

Browse files
authored
update google auth url (#442)
* update url * remove my ahh comments they suck
1 parent 422f2de commit 8b579f1

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

static/extensions/Ikelene/googleAuthExtension.js

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -69,24 +69,19 @@ class GoogleAuthExtension {
6969

7070
login() {
7171
const clientId = '382430967410-3svk456rj8ntlu3d3gd9oma09i96cpr9.apps.googleusercontent.com';
72-
const redirectUri = 'https://cadex.dev/google/googleLogin.php';
72+
const redirectUri = 'https://ikelene.dev/google/googleLogin.php';
7373
const scope = 'profile email';
7474

75-
// 🔥 Get the current domain to pass as "source"
7675
const sourceDomain = window.location.hostname;
7776

78-
// Encode sourceDomain in the "state" parameter
7977
const state = encodeURIComponent(JSON.stringify({ source: sourceDomain }));
8078

81-
// Build the OAuth URL
8279
const authUrl = `https://accounts.google.com/o/oauth2/v2/auth?response_type=code&client_id=${clientId}&redirect_uri=${encodeURIComponent(redirectUri)}&scope=${encodeURIComponent(scope)}&prompt=select_account&state=${state}`;
8380

84-
// Open the login popup
8581
this.authWindow = window.open(authUrl, 'Google Login', 'width=500,height=600');
8682

87-
// Listen for messages from the redirect page
8883
window.addEventListener('message', (event) => {
89-
if (event.origin === 'https://cadex.dev') {
84+
if (event.origin === 'https://ikelene.dev') {
9085
const { accountName, fullName, profilePicture, userId, locale, emailVerified } = event.data;
9186
this.accountName = accountName;
9287
this.fullName = fullName;

0 commit comments

Comments
 (0)