oauth2-client icon indicating copy to clipboard operation
oauth2-client copied to clipboard

Auth fails in client due to empty oauth.state in redirectUri when using iframe

Open Ray4R opened this issue 4 years ago • 1 comments

i'm using OAuth client with Nextclouds OAuth. Everything is working great. But when starting OAuth out of an iFrame ( i embed my site as nextloud externel site) no state is giving after grant access to my site. Authorization code is set but state is empty.

https://...myserver/nextcloudlogin?state=&code=6a8Vk6cSEIhVcXZEcKBjGLWj4sIbmMhn...

Any help would be appreciated

Ray4R avatar Feb 22 '22 13:02 Ray4R

Do your iframe load correctly? Some services will fail OAuth requests - when it was originated from within an iframe - for security reasons. The response headers/body should contain more info as to why they failed. I faced this when trying to use Google OAuth inside an iframe.

edsonhoraciojunior avatar Aug 02 '22 14:08 edsonhoraciojunior