@@ -191,6 +191,25 @@ public static function redirectUriProvider(): array
191191 ['openid-credential-offer:// ' , true ],
192192 ['foo:// ' , true ],
193193 ['https:// ' , true ],
194+
195+ // Private-use URI schemes for native apps (RFC8252), with empty authority component
196+ ['app.immich:///oauth-callback ' , true ],
197+ ['com.example.app:/oauth2redirect/example-provider ' , true ],
198+ ['com.example.app:oauth2redirect ' , true ],
199+ ['urn:ietf:wg:oauth:2.0:oob ' , true ],
200+ ['x://a ' , true ],
201+
202+ // Scheme must comply with RFC3986, and no whitespace is allowed
203+ ['1foo://example.com ' , false ],
204+ ['foo bar://example.com ' , false ],
205+ [' https://example.com ' , false ],
206+ ['https://example.com/foo bar ' , false ],
207+ ['://example.com ' , false ],
208+
209+ // Fragment component is not allowed (OIDC Core, 3.1.2.1)
210+ ['https://example.com/foo#bar ' , false ],
211+ ['com.example.app:#oauth2redirect ' , false ],
212+ ['app.immich:///oauth-callback#foo ' , false ],
194213 ];
195214 }
196215
0 commit comments