pulsejet / nextcloud-oidc-login

Nextcloud login via a single OpenID Connect 1.0 provider
https://apps.nextcloud.com/apps/oidc_login
GNU Affero General Public License v3.0
219 stars 59 forks source link

Enable OIDC bearer token authentication #249

Open avinash-0007 opened 10 months ago

avinash-0007 commented 10 months ago

This Mr solves the issue mention in below ticket https://github.com/pulsejet/nextcloud-oidc-login/issues/242

akhil1508 commented 7 months ago

@pulsejet Any update on this?

akhil1508 commented 4 months ago
--- lib/private/AppFramework/Middleware/Security/CORSMiddleware.php 2024-04-08 08:53:20.410444998 +0530
+++ lib/private/AppFramework/Middleware/Security/CORSMiddleware-new.php 2024-04-09 19:05:21.133629632 +0530
@@ -97,6 +97,10 @@
            // Allow to use the current session if a CSRF token is provided
            if ($this->request->passesCSRFCheck()) {
                return;
+           }           
+           // Skip CORS check for requests with oidc token auth.
+           if ($this->session->getSession() instanceof ISession && $this->session->getSession()->get('is_oidc_token_login') === 1) {
+               return;
            }
            // Skip CORS check for requests with AppAPI auth.
            if ($this->session->getSession() instanceof ISession && $this->session->getSession()->get('app_api') === true) {
akhil1508 commented 4 months ago

@pulsejet I await response from NC devs on https://github.com/nextcloud/user_oidc/issues/836 so we can avoid patching