Embedded app - frontend and backend on different URLs

cypcz
New Member
8 0 0

Hello,

is there a way to make an embedded admin app work with frontend and backend having different URLs? I have my client side react application live on a different URL than backend. 

In app setup I set App URL to my backend URL, where I handle the oauth flow. After the oauth flow, I'm trying to redirect from my backend to frontend. However, I'm getting this error: APP::ERROR::INVALID_ORIGIN Message origin 'https://frontend.url' does not match app origin 'https://backend.url`

Is there a way around this? Thank you!

0 Likes
policenauts
Trailblazer
185 9 42

I think the convention is your app url should be your front-end url, and your redirect_uri should be your callback url for handling OAuth (back-end in this case). And then after successful OAuth + billing, you redirect back to your front-end url. Whenever a user hits my front-end url, I do a check to my server side to determine whether or not I need to route them to OAuth or Billing. 

0 Likes
Chompas
Tourist
12 0 9

Did you have any success? I'm not able to do the authentication flow properly with a different frontend and backend.

 

wanxinglong
New Member
1 0 0

how do you solve the problem

0 Likes