Skip to content

fix: Add direct parameter to flow auth v2 - #46534

Merged
juliusknorr merged 1 commit into
masterfrom
fix/direct-flow-v2
Aug 5, 2024
Merged

fix: Add direct parameter to flow auth v2#46534
juliusknorr merged 1 commit into
masterfrom
fix/direct-flow-v2

Conversation

@juliusknorr

@juliusknorrjuliusknorr commented Jul 15, 2024

Copy link
Copy Markdown
Member

In SSO environments with environment variable like kerberos we may not have this authentication type on iOS devices. The current approach to still allow login is to use a direct login with configuring a rewrite on the webserver level:

RewriteEngine on
RewriteCond %{QUERY_STRING} !(?:^|&)direct=[^&]+ [NC]
#RewriteCond %{HTTP_USER_AGENT} (.*)Nextcloud\ iOS(.*)
RewriteCond %{REQUEST_METHOD} =GET
RewriteRule ^/index\.php/login/v2/flow/(.*)$ $0?%{QUERY_STRING}&direct=1 [L,QSA,NC,R=302]
  • Resolves: #

Summary

  • Manually tested using curl and user_saml auth with environment variable
  • Testing with iOS and user_saml auth with environment variable

Checklist

@juliusknorrjuliusknorr added bug 3. to review Waiting for reviews labels Jul 15, 2024
Comment threadcore/Controller/ClientFlowLoginV2Controller.php Fixed
Signed-off-by: Julius Härtl <jus@bitgrid.net>
@juliusknorr

Copy link
Copy Markdown
MemberAuthor

/backport to stable29

@juliusknorr

Copy link
Copy Markdown
MemberAuthor

/backport to stable28

@juliusknorr
juliusknorr merged commit 0678bdc into masterAug 5, 2024
@juliusknorr
juliusknorr deleted the fix/direct-flow-v2 branch August 5, 2024 20:05
@juliusknorrjuliusknorr added this to the Nextcloud 30 milestone Aug 5, 2024
@AltahrimAltahrim mentioned this pull request Aug 6, 2024
@nextcloudnextcloud deleted a comment from backportbotBotSep 10, 2024
@ChristophWurst

Copy link
Copy Markdown
Member

/backport to stable27

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to reviewWaiting for reviewsbug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@juliusknorr@ChristophWurst@susnux@github-advanced-security