Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Metabase Google Auth Login #5

Open
mhahndesign opened this issue Nov 24, 2021 · 3 comments
Open

Metabase Google Auth Login #5

mhahndesign opened this issue Nov 24, 2021 · 3 comments

Comments

@mhahndesign
Copy link

This is a great script! How would we setup the script to login to our Metabase account if we use Google authorization for login?

@pedromfarantes
Copy link

I have the same problem...

@giorgossaman
Copy link

I have the same problem. I would like to use this script with Google SSO. Any ideas?

@neozenith
Copy link

I have tweaked a version of this code to get Google SSO working in our organisation and it is a bit of a hack for now.

neozenith@eb99080

  • Log into Metabase in another tab using your Google SSO
  • Open up the browser Developer Tools and look for Cookies
  • If using Chrome Developer Tools, this is in Application > Storage > Cookies
  • Under the domain for your Metebase instance look for the key metabase.SESSION and copy that value
  • Using the code linked above, there is a new menu item Set Session to explicitly set this value
  • Your requests for Import Question and Import All Questions should now work until that session ID expires which according to the JWT I interecepted seems like it was 3 hours.

It looked like Google Identity sends the JWT back to auth/sso/google/session on your metebase API which creates a valid Session ID. So the JWT is never stored locally in the browser.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants