Custom Auth :: Redirect to SSO

I'm trying to use {{ csrfNonce }} as described, and I am getting a warning about it and cannot complete the redirect. And, of course, I am getting "CSRF DETECTED." Any ideas?

Hi @Vitaliy_Hlyniany,
I can try to help you debug this. I think the "csrfNonce" is not defined message that you are seeing is a linting error. I believe retool is properly interpolating that variable, but you can check in your network tab to make sure.

Can you try one thing for me? Can you switch the name of that parameter from state to something like query_nonce and see if that changes things? (I believe the state parameter is being used elsewhere in the code (for the standard Oauth flow) and this might be the source of the issue.)

Also, your redirect_uri is incorrect. Copy the Callback url above your URL and put it in for your redirect_uri: redirect_uri= https://epicflooring.retool.com/oauth/user/redirectCallback

Thanks!

Hi @Vitaliy_Hlyniany,
Just checking back in to make sure you are all good.