DEVELOPER CENTER
Step-by-Step
Creating Custom OAuth Button
6 min
note the following steps are for apps built on code based platforms if you are using no code platform like bubble, visit the https //docs pathfix com/bubble/custom oauth button instead design your own html snippet steps breakdown include the helper tag by injecting the script element add the html connect block with necessary attributes show state of html block as connected or not show disconnect button step 1 include helper script the script tag is the primary include that loads all the libraries based on what is needed in this case you only need it to load the pinc oauth min library replacements replacement description pathfix public key the public key for your pathfix application see pathfix keys docid\ i5bp9dypntquakv2r8mbh to learn more end user id the identifier used by your app to identify the logged in user (a unique id you associate your user with) step 2 add html connect block add the following html block to your page you can customize the html in any manner you want just ensure that the attributes are included as specified connect replacements replacement description pathfix public key the public key for you pathfix application see pathfix keys docid\ i5bp9dypntquakv2r8mbh to learn more end user id the identifier used by your app to identify the logged in user (a unique id you associate your user with) provider name the internal provider reference for your added integration see provider reference docid\ z26cdo6omb40w2fymu ut to learn more step 3 change connected state there are two ways to do this (recommended) make an api call (proxied by your server) to the provider and check the response for errors make a call to the user connection docid\ lvvpbho79ymzzhjtfpgha api(proxied by your server) to check whether the user is authorized step 4 offer disconnect offer your users the ability to disconnect or revoke their authorization call the revoke connection api (proxied by your server) available on the user connection docid\ lvvpbho79ymzzhjtfpgha page under the revoke user connection section proxy api's through your server all api calls either to the provider or pathfix api should be proxied by your server as they will include the private key