Redirect URI / Scheme for OAuth and Plaid

SDK Version: 43.0.0
Platforms: Android and iOS

Hey folks.

I am a bit confused and was hoping someone could give an easy explanation or example on how to set up a redirect uri for plaid OAuth.

I was under the impression that - https://auth.expo.io/@username/slug would be sufficient to pass as the redirect uri but I am getting an error after attempting to authenticate when that URL is called.

So I looked into the expo scheme property, but a requirement from plaid is that the redirect URI is secured by HTTPS and wasn’t sure if the deep link in scheme followed that pattern or how to use it.

I saw the expo oauth library, but for plaid, the redirect uri needs to be set in a backend request and added to my allowed uris on plaid. So I just want to know which URI to use

TLDR -

How do I generate a redirectUri for my iOS and Android app that follows TLS protocol and is permanent so I can set it as a redirect URI for plaid.

Thanks and happy holidays!

This is the message I get redirecting to my expo OAuth url

i got same problem, how to solve this?

I’ll post my solution once I’m done implementing. I made some changes and got things working on iOS.

Still need to test and deploy on Android but for iOS, I needed to setup an endpoint on my backend app that served a JSON file under a URL checked by apple .well-known/apple-app-site-association

<domain>/.well-known/apple-app-site-association

The endpoint returns JSON looking like so

return JsonResponse(
    {
        "applinks": {
            "apps": [],
            "details": [
                {
                    "appID": "<TEAM-ID>.<BUNDLE-ID>",
                    "paths": ["/redirect/*"],
                }
            ],
        }
    }
)

In expo I needed to update my ios config in app.json adding an associatedDomain looking like so

"ios": {
  "associatedDomains": ["applinks:<domain>"],
},

I needed to update settings in the apple developer console under Certificates, Identifiers & Profiles > Identifiers then select your app and check the box Associated Domains

I needed to remove my current provisioning file and generate a new one which can be done with expo credentials:manager

I uploaded my new build to iOS

Now anytime someone clicks a link with <domain>/redirect/<example> my iPhone app opens instead of the web browser.

For Plaid.

I needed to whitelist my redirect URI which can be done here - Plaid - Dashboard

When initiating Plaid link from the backend add the redirect URI to your link config

link_config['redirect_uri'] = <domain>/redirect/plaid

Now when a user follows plaids OAuth flow, they’ll be taken back to your application after authenticating on the financial institution’s platform.

I’ll add android instructions when I have time to finish implementing.

1 Like

i got same problem..

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.