#rk0660-redirect
1 messages · Page 1 of 1 (latest)
Hello, those URLs don't necessarily have to match up. Have you tried this and seen some error?
Also out of curiosity is there a reason one of those is http and the other https?
Yeah basically I don't have access to the stripe dashboard (a senior dev does), and the redirect uri they have in place is an https one, while for some reason in production the link I have coded in the redirect_uri parameter is an http one. This throws some errors (stripe ignores this redirect uri and just goes with the default)
I was considering if that was an issue then I could push out a fix for that but if it's not the issue then I can't see why stripe is failing to recognize the redirect-uri
I saw this SO post so that just made me think the https/http was the issue https://stackoverflow.com/questions/32351320/stripe-callback-redirecting-http-instead-https-uri
Apologies for my confusion. As the error says it needs to exactly match so yes it is http vs https
So you are saying you can push out the fix of having the URI also be https in your code?
I assume I could maybe just hardcode it if that could be the issue? That's not my SO post so I don't particularly know if that's exactly what could be my problem
Essentially the redirect_uri parameter is being ignored so I assume it's being read as invalid from Stripe, and that's the only lead I have on possibly why
I'm not sure why it's defaulting to http in the Stripe redirect_uri parameter when in my code it's hardcoded as https:// + request.host
do you have an AccountLink example where you're hardcoding https but the resulting response has http?
My URL in my codebase is akin to href: https://connect.stripe.com/express/oauth/authorize?redirect_uri=@host/account where @host is defined to be https://mywebsite.com. However, when I go on my server and click the href to try to set up an account, the redirect uri parameter in the URL is https://connect.stripe.com/express/oauth/authorize?redirect_uri=http://mywebsite.com/account @left peak
you should log out in your code what @host comes out to be realistically to check
Alright I'll give it a go. So just to confirm, does the https / http protocol need to align with whatever is set in the redirect_uri dashboard?
If it's https in the dashboard the redirect_uri parameter needs to be https, and same for http?
it should just be https, Im not sure but the Dashboard probably doesn't allow you to enter a non https redirect uri I thin