mirror of
https://github.com/immich-app/immich.git
synced 2025-07-09 09:12:57 +02:00
feat(server): mobile oauth with custom scheme redirect uri (#1204)
* feat(server): support providers without support for custom schemas * chore: unit tests * chore: test mobile override * chore: add details to the docs
This commit is contained in:
parent
0b65bb7e9a
commit
6974d4068b
22 changed files with 459 additions and 188 deletions
mobile/openapi/lib/api
33
mobile/openapi/lib/api/o_auth_api.dart
generated
33
mobile/openapi/lib/api/o_auth_api.dart
generated
|
@ -157,6 +157,39 @@ class OAuthApi {
|
|||
return null;
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'GET /oauth/mobile-redirect' operation and returns the [Response].
|
||||
Future<Response> mobileRedirectWithHttpInfo() async {
|
||||
// ignore: prefer_const_declarations
|
||||
final path = r'/oauth/mobile-redirect';
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
|
||||
final queryParams = <QueryParam>[];
|
||||
final headerParams = <String, String>{};
|
||||
final formParams = <String, String>{};
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
path,
|
||||
'GET',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
);
|
||||
}
|
||||
|
||||
Future<void> mobileRedirect() async {
|
||||
final response = await mobileRedirectWithHttpInfo();
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'POST /oauth/unlink' operation and returns the [Response].
|
||||
Future<Response> unlinkWithHttpInfo() async {
|
||||
// ignore: prefer_const_declarations
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue