问题
My application works in iframe (injected with chrome extension). The application needs to ask user some permissions with google oauth2. Redirecting to oauth-page does not work directly in iframe, because of X-Frame-Options: SAMEORIGIN at https://accounts.google.com/o/oauth2/auth
Is there a way to display the page in popup?
回答1:
Google+ Sign-in seems a good choice for your case. It comes with a button that triggers the auth flow in a popup window.
来源:https://stackoverflow.com/questions/10791673/google-oauth2-authorization-in-iframe-popup