From 98316c34628c601bbba32770f7f12b7865f616b3 Mon Sep 17 00:00:00 2001 From: Vinzent Date: Sun, 7 Jan 2024 20:55:06 +0100 Subject: [PATCH 1/3] feat: add linkedin_oidc OAuthProvider --- packages/gotrue/lib/src/types/o_auth_provider.dart | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/gotrue/lib/src/types/o_auth_provider.dart b/packages/gotrue/lib/src/types/o_auth_provider.dart index 7b174647..a8af198a 100644 --- a/packages/gotrue/lib/src/types/o_auth_provider.dart +++ b/packages/gotrue/lib/src/types/o_auth_provider.dart @@ -11,6 +11,7 @@ enum OAuthProvider { kakao, keycloak, linkedin, + linkedin_oidc, notion, slack, spotify, From 54f5e3a15989511152c16c77a64276ee41c39e1a Mon Sep 17 00:00:00 2001 From: Vinzent Date: Sun, 7 Jan 2024 20:59:57 +0100 Subject: [PATCH 2/3] style: disable lint for file --- packages/gotrue/lib/src/types/o_auth_provider.dart | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/gotrue/lib/src/types/o_auth_provider.dart b/packages/gotrue/lib/src/types/o_auth_provider.dart index a8af198a..26c44d61 100644 --- a/packages/gotrue/lib/src/types/o_auth_provider.dart +++ b/packages/gotrue/lib/src/types/o_auth_provider.dart @@ -1,3 +1,5 @@ +// ignore_for_file: constant_identifier_names + enum OAuthProvider { apple, azure, From 104fd34c4853246337e90e3159c5ea928cace2e3 Mon Sep 17 00:00:00 2001 From: Vinzent Date: Mon, 8 Jan 2024 22:25:36 +0100 Subject: [PATCH 3/3] refactor: use camel case --- packages/gotrue/lib/src/gotrue_client.dart | 4 ++-- packages/gotrue/lib/src/types/o_auth_provider.dart | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/packages/gotrue/lib/src/gotrue_client.dart b/packages/gotrue/lib/src/gotrue_client.dart index 7370a175..a5e1be4f 100644 --- a/packages/gotrue/lib/src/gotrue_client.dart +++ b/packages/gotrue/lib/src/gotrue_client.dart @@ -366,7 +366,7 @@ class GoTrueClient { options: GotrueRequestOptions( headers: _headers, body: { - 'provider': provider.name, + 'provider': provider.snakeCase, 'id_token': idToken, 'nonce': nonce, 'gotrue_meta_security': {'captcha_token': captchaToken}, @@ -889,7 +889,7 @@ class GoTrueClient { required Map? queryParams, bool skipBrowserRedirect = false, }) async { - final urlParams = {'provider': provider.name}; + final urlParams = {'provider': provider.snakeCase}; if (scopes != null) { urlParams['scopes'] = scopes; } diff --git a/packages/gotrue/lib/src/types/o_auth_provider.dart b/packages/gotrue/lib/src/types/o_auth_provider.dart index 26c44d61..7af6bfbd 100644 --- a/packages/gotrue/lib/src/types/o_auth_provider.dart +++ b/packages/gotrue/lib/src/types/o_auth_provider.dart @@ -1,5 +1,3 @@ -// ignore_for_file: constant_identifier_names - enum OAuthProvider { apple, azure, @@ -13,7 +11,7 @@ enum OAuthProvider { kakao, keycloak, linkedin, - linkedin_oidc, + linkedinOidc, notion, slack, spotify,