website logo
HomeAutomationLogin
⌘K
BUBBLE SETUP DOCS
Introduction
Pathfix and Bubble Setup
Custom OAuth Button
Capturing User Consent
Multiple Connection Auth
Custom Redirect Domain
Provider reference
Pathfix keys
Error codes
Provider Setup Docs
NO CODE PLUGINS
No-code Plugins
Pathfix OAuth Connector
Single Sign-on (SSO) Login
Facebook Connector
Google Calendar Integration
Google Mail Integration
Instagram Integration
LinkedIn Integration
Microsoft Calendar Integration
Mailchimp Integration
Quickbooks Integration
Slack Integration
Spotify Search Integration
Twilio Integration
Twitter Integration
Twitter V2 Integration
Xero Integration
Whitelabel Your Connectors
Docs powered by archbee 
11min

Capturing User Consent

When using the Pathfix Custom oauth option, there may be times when you may need to capture the user consent status (if they have connected their accounts or not).

The following documentation walks you through on checking and updating the user consented status against your user in bubble.io

Depending on the method you are using, you will see the Consented event option show up as either PathfixCustom (for those that have chosen to use a custom oauth button) or Pathfix Connector ([default] for those who use Pathfix rendered OAuth buttons).



Create Custom Field

Start by adding a custom text field to your user data to save the user status:

  • In Bubble.io, go to Data and User data
  • Click on Create a new field and add the provider name







Workflow

After you have set up your oauth connect buttons (Pathfix rendered buttons or your own custom oauth button) add the following workflows:

In this example, we will go through the process using Google Calendar as an example.

Connected Workflow

This workflow will check the consented status (where the user is connected)

  • Add new workflow
    • Elements -> Pathfix Custom User Consented




  • Step 1 would be to Make changes to current user
    • Click on the + Change another field
    • Select the created Custom field Google connected is equal to yes
    • Add a condition to change Only when the consented provider matches (in this example we have used googlecalendar)

Note: If you are working with more than 1 provider, you can add additional Step's and repeat the same condition





Disconnected Workflow

This workflow will check if the user connection has disconnected the provider from your app.

  • Add new workflow
    • Elements -> Pathfix Custom Disconnected







  • Step 1 would be to Make changes to current user
    • Click on the + Change another field
    • Select the created Custom field Google connected is equal to no
    • Add a condition to change Only when the consented provider matches (in this example we have used googlecalendar)

Note: If you are working with more than 1 provider, you can add additional Step's and repeat the same condition





Using the Consented Status

You can add workflows to show/hide elements on your page depending on the user's consented status for a provider.

Example: show the Disconnect button if the user is connected and hide the Connect button.





Show Connect button if the user is disconnected and hide the Disconnect button





The Consented status updates automatically based on the connection status of the user. No additional calls need to be made.







Need help? Reach out to us at support@pathfix.com and we would be happy to assist!

Updated 03 Mar 2023
Did this page help you?
Yes
No
UP NEXT
Multiple Connection Auth
Docs powered by archbee 
TABLE OF CONTENTS
Create Custom Field
Workflow
Connected Workflow
Disconnected Workflow
Using the Consented Status