@seaverse/auth-sdk 0.4.6 → 0.4.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1817,7 +1817,13 @@ MIT © [SeaVerse Team](mailto:support@seaverse.com)
1817
1817
 
1818
1818
  ## Changelog
1819
1819
 
1820
- ### v0.4.4 (Current Version)
1820
+ ### v0.4.6 (Current Version)
1821
+ - 🐛 **Bug Fix**: Fix OAuth buttons not responding in email login view
1822
+ - Fixed HTML element ID conflict between new style and old style login views
1823
+ - Old style login view OAuth buttons now have unique IDs with 'old' prefix
1824
+ - Properly bind click events to all OAuth buttons in both views
1825
+
1826
+ ### v0.4.4
1821
1827
  - 🎨 **Login UI Redesign**: Dual-view login system with progressive disclosure
1822
1828
  - **New Style View (Default)**: Modern OAuth-first interface with brand color #00E599
1823
1829
  - Google as primary button, GitHub/Discord as secondary options
package/dist/index.cjs CHANGED
@@ -2969,11 +2969,11 @@ class AuthModal {
2969
2969
  const socialGrid = document.createElement('div');
2970
2970
  socialGrid.className = 'social-buttons-grid';
2971
2971
  if (this.options.enableOAuth?.google) {
2972
- const googleBtn = this.createSocialButton('google', 'Google', 'login');
2972
+ const googleBtn = this.createSocialButton('google', 'Google', 'login', false, 'old');
2973
2973
  socialGrid.appendChild(googleBtn);
2974
2974
  }
2975
2975
  if (this.options.enableOAuth?.github) {
2976
- const githubBtn = this.createSocialButton('github', 'Github', 'login');
2976
+ const githubBtn = this.createSocialButton('github', 'Github', 'login', false, 'old');
2977
2977
  socialGrid.appendChild(githubBtn);
2978
2978
  }
2979
2979
  if (socialGrid.children.length > 0) {
@@ -2981,7 +2981,7 @@ class AuthModal {
2981
2981
  }
2982
2982
  // Discord button (full width)
2983
2983
  if (this.options.enableOAuth?.discord) {
2984
- const discordBtn = this.createSocialButton('discord', 'Discord', 'login', true);
2984
+ const discordBtn = this.createSocialButton('discord', 'Discord', 'login', true, 'old');
2985
2985
  form.appendChild(discordBtn);
2986
2986
  }
2987
2987
  }
@@ -3446,11 +3446,11 @@ class AuthModal {
3446
3446
  wrapper.appendChild(toggleBtn);
3447
3447
  return wrapper;
3448
3448
  }
3449
- createSocialButton(provider, label, mode, fullWidth = false) {
3449
+ createSocialButton(provider, label, mode, fullWidth = false, idPrefix = '') {
3450
3450
  const button = document.createElement('button');
3451
3451
  button.type = 'button';
3452
3452
  button.className = fullWidth ? 'btn-social btn-social-full' : 'btn-social';
3453
- button.id = `${provider}${mode === 'login' ? 'SignIn' : 'SignUp'}Modal`;
3453
+ button.id = `${idPrefix}${provider}${mode === 'login' ? 'SignIn' : 'SignUp'}Modal`;
3454
3454
  // SVG icons for each provider
3455
3455
  const icons = {
3456
3456
  google: `<svg width="20" height="20" viewBox="0 0 24 24">
@@ -3738,7 +3738,7 @@ class AuthModal {
3738
3738
  bindSocialLoginButtons() {
3739
3739
  if (!this.modal)
3740
3740
  return;
3741
- // Google login buttons
3741
+ // New style login view - Google login buttons
3742
3742
  const googleSignInBtn = this.modal.querySelector('#googleSignInModal');
3743
3743
  googleSignInBtn?.addEventListener('click', (e) => {
3744
3744
  e.preventDefault();
@@ -3749,7 +3749,7 @@ class AuthModal {
3749
3749
  e.preventDefault();
3750
3750
  this.startOAuthFlow('google');
3751
3751
  });
3752
- // Discord login buttons
3752
+ // New style login view - Discord login buttons
3753
3753
  const discordSignInBtn = this.modal.querySelector('#discordSignInModal');
3754
3754
  discordSignInBtn?.addEventListener('click', (e) => {
3755
3755
  e.preventDefault();
@@ -3760,7 +3760,7 @@ class AuthModal {
3760
3760
  e.preventDefault();
3761
3761
  this.startOAuthFlow('discord');
3762
3762
  });
3763
- // GitHub login buttons
3763
+ // New style login view - GitHub login buttons
3764
3764
  const githubSignInBtn = this.modal.querySelector('#githubSignInModal');
3765
3765
  githubSignInBtn?.addEventListener('click', (e) => {
3766
3766
  e.preventDefault();
@@ -3771,6 +3771,24 @@ class AuthModal {
3771
3771
  e.preventDefault();
3772
3772
  this.startOAuthFlow('github');
3773
3773
  });
3774
+ // Old style login view - Google login button
3775
+ const oldGoogleSignInBtn = this.modal.querySelector('#oldgoogleSignInModal');
3776
+ oldGoogleSignInBtn?.addEventListener('click', (e) => {
3777
+ e.preventDefault();
3778
+ this.startOAuthFlow('google');
3779
+ });
3780
+ // Old style login view - Discord login button
3781
+ const oldDiscordSignInBtn = this.modal.querySelector('#olddiscordSignInModal');
3782
+ oldDiscordSignInBtn?.addEventListener('click', (e) => {
3783
+ e.preventDefault();
3784
+ this.startOAuthFlow('discord');
3785
+ });
3786
+ // Old style login view - GitHub login button
3787
+ const oldGithubSignInBtn = this.modal.querySelector('#oldgithubSignInModal');
3788
+ oldGithubSignInBtn?.addEventListener('click', (e) => {
3789
+ e.preventDefault();
3790
+ this.startOAuthFlow('github');
3791
+ });
3774
3792
  }
3775
3793
  switchView(view) {
3776
3794
  if (!this.modal)