feat(server): mobile oauth with custom scheme redirect uri ()

* 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:
Jason Rasmussen 2022-12-29 15:47:30 -05:00 committed by GitHub
parent 0b65bb7e9a
commit 6974d4068b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 459 additions and 188 deletions
mobile/openapi/lib/api

View file

@ -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