Forum Discussion

Micha1's avatar
Micha1
Icon for Nimbostratus rankNimbostratus
Mar 03, 2023

oAuth vs Google - redirect absolute URI

Hi, 

I need to clarify one thing with oAuth redirect

 

I have website https://xxxx.cz/neco/jesteneco/  - this website is protected by oAuth Google authorization but if the user is successfully logged in by oAuth, he is then redirected only to https://xxxx.cz (the path is missing) . 

I thought I'd change in APM oAuth Client - Redirection URI to https://xxxx.cz/neco/jesteneco/oauth/client/redirect

and of course I'll change it on the google side

But I get an error:

" 01071b32:3: Invalid Redirect URI (https://%{session.server.network.name}/neco/jesteneco/oauth/client/redirect) in OAuth Client (/Common/Google_OAuth_com_act_oauth_client_ag). Path must be '/oauth/client/redirect'. "

Do you have any idea how I should redirect user to https://xxxx.cz/neco/jesteneco/ after oAuth by Google ?

 

Thank you

2 Replies

  • The redirect url must always be '/oauth/client/redirect'. As I understand this is the hardcoded URI APM uses. After this redirect there should be another redirect from this uri to '/'. You must change this redirect.

  • I confirm what Juergen_Mang  said as I tried to use redirect ending in VPE or access::respond but it breaks the connection.

     

    Still if you are using LTM+APM F5 seems to know to return you to the original landing url after /oauth/client/redirect and for me this means if you have issues it is a bug or you don't have the pool attached to the LTM VS and maybe use Resource Assign or Pool Assign Agent as I have no issues. I open /niki then I get oauth authenticated and at the end I am returned to /niki. I am on 16.1.3.5.