Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot use SSO if app runs in subdirectory #362

Closed
1 task
bioschaf opened this issue Jul 5, 2024 · 1 comment
Closed
1 task

Cannot use SSO if app runs in subdirectory #362

bioschaf opened this issue Jul 5, 2024 · 1 comment
Labels
bug Something isn't working fixed The issue is fixed (in a coming release)
Milestone

Comments

@bioschaf
Copy link

bioschaf commented Jul 5, 2024

Version

5.2.0

Details & Steps to reproduce

If the app runs in a subdirectory (e.g. host.xy/subdir) the buttons on the login-page still point to host.xy/socialite/... resulting in errors.

Expectation

Buttons should use relative targets and in this example point to host.xy/subdir/socialite/...

Error & Logs

No response

Execution environment

No response

Containerization

  • Docker

Additional information

Can be fixes with the following patch

index 8b8bee52..6c246d1e 100644
--- a/resources/js/views/auth/Login.vue
+++ b/resources/js/views/auth/Login.vue
@@ -130,10 +130,10 @@
                     {{ $t('auth.or_continue_with') }}
                 </div>
                 <div class="column py-1">
-                    <a v-if="$2fauth.config.sso.openid" id="lnkSignWithOpenID" class="button is-link is-outlined is-small ml-2" href="/socialite/redirect/openid">
+                    <a v-if="$2fauth.config.sso.openid" id="lnkSignWithOpenID" class="button is-link is-outlined is-small ml-2" href="./socialite/redirect/openid">
                         OpenID<FontAwesomeIcon class="ml-2" :icon="['fab', 'openid']" />
                     </a>
-                    <a v-if="$2fauth.config.sso.github" id="lnkSignWithGithub" class="button is-link is-outlined is-small ml-2" href="/socialite/redirect/github">
+                    <a v-if="$2fauth.config.sso.github" id="lnkSignWithGithub" class="button is-link is-outlined is-small ml-2" href="./socialite/redirect/github">
                         Github<FontAwesomeIcon class="ml-2" :icon="['fab', 'github-alt']" />
                     </a>
                 </div>
@@ -171,10 +171,10 @@
                     {{ $t('auth.or_continue_with') }}
                 </div>
                 <div class="column py-1">
-                    <a v-if="$2fauth.config.sso.openid" id="lnkSignWithOpenID" class="button is-link is-outlined is-small mr-2" href="/socialite/redirect/openid">
+                    <a v-if="$2fauth.config.sso.openid" id="lnkSignWithOpenID" class="button is-link is-outlined is-small mr-2" href="./socialite/redirect/openid">
                         OpenID<FontAwesomeIcon class="ml-2" :icon="['fab', 'openid']" />
                     </a>
-                    <a v-if="$2fauth.config.sso.github" id="lnkSignWithGithub" class="button is-link is-outlined is-small mr-2" href="/socialite/redirect/github">
+                    <a v-if="$2fauth.config.sso.github" id="lnkSignWithGithub" class="button is-link is-outlined is-small mr-2" href="./socialite/redirect/github">
                         Github<FontAwesomeIcon class="ml-2" :icon="['fab', 'github-alt']" />
                     </a>
                 </div>
@Bubka Bubka added the bug Something isn't working label Jul 5, 2024
@Bubka
Copy link
Owner

Bubka commented Aug 1, 2024

Thx for the report, this will be fixed in the next version.

@Bubka Bubka added the fixed The issue is fixed (in a coming release) label Sep 25, 2024
@Bubka Bubka moved this from Todo to Done in 2FAuth backlog Sep 25, 2024
@Bubka Bubka added this to the v5.3.0 milestone Sep 25, 2024
@Bubka Bubka closed this as completed in 091129e Sep 27, 2024
@Bubka Bubka moved this from Done to Released in 2FAuth backlog Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed The issue is fixed (in a coming release)
Projects
Status: Released
Development

No branches or pull requests

2 participants