Amplify SDK login - Custom UI - Android

Viewed 361

Is it possible to use a custom UI for Amplify Android's login process? I have checked online and there is very little or none about this subject. The official documentation just talks about using the web UI and that's it.

There are Amplify UI Components(https://docs.amplify.aws/ui) available for JavaScript (React, Angular, etc.) but nothing for native Android or iOS.

Also here it states(https://docs.amplify.aws/start/q/integration/android) that the Amplify UI Components are available for other implementations only

I also checked the AWS labs repo on GitHub(https://github.com/awslabs/aws-sdk-android-samples), and there's nothing about UI.

Anyone been able to use a custom UI to login with Amplify, on Android?

1 Answers

As Jameson mentioned, Amplify is in the process of developing this for Android but in the meantime you can use the escape hatch of Amplify Auth to get an instance of the old AWSMobileClient and use its drop in auth solution. Note that this will be deprecated in the future so use with that in mind.

Here's how to get AWSMobileClient through the escape hatch: https://docs.amplify.aws/lib/auth/escapehatch/q/platform/android

How to use AWSMobileClient drop in auth: https://docs.amplify.aws/sdk/auth/drop-in-auth/q/platform/android

Dependencies needed for AWSMobileClient drop in auth: https://docs.amplify.aws/sdk/auth/getting-started/q/platform/android

Related