跳到主要内容

3p Login Configurations

ESP RainMaker uses Amazon Web Services to provide RESTful APIs which provides authentication, authorization and user management in mobile apps. APIs are also useful to communicate with devices. ESP RainMaker also supports login to ESP RainMaker ecosystem using Google Account and Apple ID account.

To enable 3p login and authentication in the phone app, it's a 2 step process viz deployment settings and configurations as well as enabling the same on the phone app side.

Deployment Configurations

Please follow the documentation steps in the deployment guide to enable and configure the ESP RainMaker 3p login from Google Console, Apple Developer account and finally in ESP RainMaker Dashboard.

App Side Configurations

Along with the deployment settings and configurations, there are configurations that need to be done in the App side code for setting up redirect URL. Follow the Android and iOS sections for more details.

You will have to change the authentication URL and other parameters like clientId and redirect URL as per your deployment in the rainmaker.config.ts

KeyTypeDescription
clientIdStringUniquely identifies an app in a user pool. Check steps to get the Client ID
authUrlStringOAuth URL for third party login. Check steps to get the Authentication URL.
redirectUriStringCustom URI schemes needed for redirecting user back to your app after third party login is completed. You also need to copy this value into rainmaker.config.ts file, see below.

Android Configurations

If you are going to build an Android app, supporting 3p logins would require these steps to be followed in the Android specific files.

设置重定向 URI

To setup redirect URI for your app, you need to write your application ID as a host available in data tag in AndroidManifest.xml file.

Here is the example of redirect URI of ESP RainMaker app.

Redirect URI for ESP RainMaker Home app will be

rainmaker://com.espressif.novahome/success

Replace com.espressif.rainmaker with your application ID in above data. So redirect URI for your app will be

rainmaker://your_application_id/success

iOS Configurations for 3p Login

If you are going to build an iOS app, supporting 3p logins would require these steps to be followed in the iOS specific files.

Add URL Scheme

App Bundle ID should be included in the Info.plist file of the ESP RainMaker Home Project. Click ESPRainMaker > Info Tab. Scroll down to URL Types and expand. Add your URL scheme as shown below.

url_scheme

Creating Redirect URL

Redirect URL for ESP RainMaker Home app will be:

com.espressif.novahome://success

Replace com.espressif.novahome with your application Bundle ID in the above data. So Redirect URL for your app will be:

com.your_application_id.app://success

On this page