diff --git a/public/apple-login-flow-chart.svg b/public/apple-login-flow-chart.svg new file mode 100644 index 00000000..38e3be82 --- /dev/null +++ b/public/apple-login-flow-chart.svg @@ -0,0 +1,3 @@ + + +

Handled in the plugin

Pass the link

Apple redirects to your backend

await SocialLogin.login()

Generate the login URL

Open the Chrome browser

Wait for the user to login

Handle the data returned from Apple

Redirect back to the app

Return to JS

\ No newline at end of file diff --git a/public/social_login_plugin_blog.webp b/public/social_login_plugin_blog.webp new file mode 100644 index 00000000..ef9f47aa Binary files /dev/null and b/public/social_login_plugin_blog.webp differ diff --git a/src/content/blog/capacitor-social-login-release.md b/src/content/blog/capacitor-social-login-release.md new file mode 100644 index 00000000..594bab46 --- /dev/null +++ b/src/content/blog/capacitor-social-login-release.md @@ -0,0 +1,46 @@ +--- +slug: "Release-of-a-brand-new-capacitor-social-login" +title: Release of a brand new Capacitor Social Login plugin +author: WcaleNieWolny +author_url: https://github.com/WcaleNieWolny/WcaleNieWolny +created_at: 2024-10-08 +updated_at: 2024-10-08 +head_image: "/social_login_plugin_blog.webp" +head_image_alt: Capgo organization system illusatration +tag: Capacitor +published: true +next_blog: "" +--- + +# Introduction + +Hey, I am Michael ([WcaleNieWolny](https://github.com/WcaleNieWolny)) šŸ‘‹, + +After a month of hard (and a bit painful šŸ™ƒ) work, I am pleased to announce the first release of the Capacitor Social Login. This plugin is designed to assist in handling both Google and Apple Login on iOS and Android. Furthermore, together with Martin, we have been working on some unique features that include: + + - The introduction of Login with Apple on Android + - The adoption of the new Google Credentials API + - The addition of detailed documentation + +# Login with Apple on Android + +First, letā€™s discuss the major innovation of ā€˜Login with Appleā€™ on Android. This was non-trivial, as Appleā€™s SDK doesnā€™t provide this functionality. I used [this article](https://johncodeos.com/how-to-add-sign-in-with-apple-button-to-your-android-app-using-kotlin/) as my reference point, but I changed it a little in order to make it more secure. The flow I ended up looks like this: + +
Apple Login flow chart
+ +Unfortunately, it requires a backend and some modifications to yourā€™s app code, but itā€™s the best I could do. + +# Refreshed Google Login on Android + +Next, I attempted to implement Google Login on Android. As it turns out, [CodetrixStudioā€™s CapacitorGoogleAuth](https://github.com/CodetrixStudio/CapacitorGoogleAuth) uses a [soon-to-be deprecated GMS library](https://developer.android.com/identity/sign-in/legacy-gsi-migration#authorization). As a result of this GMS library being considered legacy, I decided to use the [CredentialManager](https://developer.android.com/identity/sign-in/credential-manager-siwg). This helped simply the login flow and it removed the annoying [error 10](https://github.com/CodetrixStudio/CapacitorGoogleAuth/issues/332) šŸŽ‰ + +# Documentation + +Lastly, I wrote some amazing āœØ documentation. I spent a lot of time making sure that the docs were accurate and extensive. +The docs include a detailed guide on setting both Apple and Google. I also provided an [example backend](https://github.com/WcaleNieWolny/capgo-social-login-backend-demo) for Login with Apple šŸŽ + +Feel free to check out the [Apple](https://github.com/Cap-go/capacitor-social-login/blob/main/docs/setup_apple.md) and [Google](https://github.com/Cap-go/capacitor-social-login/blob/main/docs/setup_google.md) guides! + +# Conclusion + +In conclusion, the Capacitor Social Login plugin introduces a lot of new and exciting features with more to come in the future šŸš€ \ No newline at end of file