Articles on: Authentication

How to signup my ChatGPT Plugin members using Google

Introduction



OpenAI provides three different authentication mechanisms for your ChatGPT Plugins:

HTTP Level
User HTTP
OAuth

In this article we are going to focus on OAuth since it's the most convenient way to signup new users when they install your ChatGPT plugin for the first time.

PluginLab offers many different sign-in methods such as Passwordless Email and Google.

Authenticating your users with a third party such as Google has many advantages over the simpler Passwordless Email flow.

Google provides more info (firstname, lastname, pictureUrl) than just the email address
If you users are already logged-in on their Google account, they will be able to sign-up in two clicks, so it's faster


If you prefer watching a video



If you are the kind of person who prefers watching a tutorial on your couch, then be our guest. Otherwise, keep scrolling






1. Create and configure your plugin without OAuth




In this tutorial we are going to use the example plugin to get started quickly.

If you want to configure your own plugin directly I suggest you have a look at How to configure my ChatGPT plugin with PluginLab.

If you have any trouble configuring your plugin manifest or OAS, feel free to reach out and we'll do it with you :)


Starting with an example plugin


If you start with the example plugin, no extra configuration is required before starting. This is perfectly suited for you if you just wanna try PluginLab quickly.


2. Create your Google OAuth Client ID



To use Google OAuth 2.0 in your application, you need an OAuth 2.0 client ID, which your application uses when requesting an OAuth 2.0 access token.

To create an OAuth 2.0 client ID in the Google console:

Go the the Google Cloud Platform
From the projects list, select a project or create a new one.
If the APIs & services page isn't already open, open the console left side menu and select APIs & services.
On the left, click Credentials.
Click New Credentials, then select OAuth client ID.

If you never used this feature before you will be asked to configure the consent screen. If that's the case, just proceed with the following steps, otherwise go on the next list.

Consent Screen



For the User Type, choose External
Click on Create
Add the name to display on this screen (most likely the name of your plugin)
Add a logo if you want to
Add the user support email and the contact info
Click on save and go back to the Credentials screen to create an OAuth Client ID


Continuing



Create the OAuth client ID

Click New Credentials, then select OAuth client ID.
Select "Web application" as the application type
Add the name you want (most likely the name of your plugin)
Click on save
Go back to PluginLab

3. Configure OAuth on PluginLab



At this stage we assume your plugin is configured properly as well as your Google Cliend ID.

Go to https://app.pluginlab.ai/auth-schemas
Click on the Configure button in the OAuth section
Find the Google sign-in method and click on Activate

Choosing Google Sign-In Method

Now paste the Client ID provided by the Google Client ID you just created and click on next
Copy the Redirect URI provided by PluginLab
Go back to Google Cloud Platform and click on Edit your client id
In the Authorized URIs section, add the Authorized URI
Save on GCP and on PluginLab
Done!


Configure your Client ID and Redirect URI


4 Activate passwordless email (optional)



This is not mandatory, but if you want to can also activate the Passwordless Email authentication flow. It's just one more click (really).

Go back on the sign-in method page
Look for passwordless email
Click on activate
That's it! You can go to the next section :)


Passwordless email


5 Proceed with installation on ChatGPT



Now we have everything setup, the last step is to proceed with the installation on ChatGPT.

This step is crucial to get your OAuth flow configured properly.

Go to Manage OAuth Settings
Swich on Define as active schema and confirm
Click on setup

Enabling OAuth Schema

Go to https://chat.openai.com/
Open the Plugin store
Click on Develop your own plugin
Paste the given URL and Click on Find manifest
Follow the steps in the PluginLab modal and paste the Client ID and Secret into ChatGPT
Click on Next, copy the verification token value from ChatGPT into PluginLab
Click on next on PluginLab and click on Verify tokens on ChatGPT

Installing the plugin


At this stage, it is simpler to click on Install later (or cancel if you get an error), then install your plugin as unverified plugin to test it as a user.

Cancel the modal
Go to Plugin store
Choose Install unverified plugin
Paste your plugin URL
Proceed with installation and you will get redirected to the user login page

Good job!



Bonus: Add your custom branding



If you wanna customize your Authentication portal you can go to https://app.pluginlab.ai/plugin/branding and configure your custom domain.

Congrats you now have a nifty authentication portal


Feeling lost?



Feel free to contact us using the Chatbox on the bottom right corner and we will be more than happy to help!

Updated on: 20/06/2023

Was this article helpful?

Share your feedback

Cancel

Thank you!