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

Google Sign-On / LDAP Authentication Support #20

Open
jackcsk opened this issue Feb 23, 2020 · 2 comments
Open

Google Sign-On / LDAP Authentication Support #20

jackcsk opened this issue Feb 23, 2020 · 2 comments
Labels
good first issue Good for newcomers

Comments

@jackcsk
Copy link

jackcsk commented Feb 23, 2020

Just wonder if there is any roadmap to support Google Sign-On / LDAP, or is there an alternative way to achieve that? Thanks.

@mertsalik
Copy link
Owner

mertsalik commented Mar 20, 2020

Hi,
Yes, may be we can implement sign-in / authenticate feature.
There is some information about it
(https://github.com/metabase/metabase/blob/master/docs/api-documentation.md#post-apisessiongoogle_auth)
but i have to test / reverse-check this endpoint for reasonable client implementation. Metabase's api doc is very superficial...

@mertsalik mertsalik added the good first issue Good for newcomers label Mar 20, 2020
@gutdraw
Copy link

gutdraw commented Apr 3, 2020

import requests

cookies = {

}

headers = {
'Connection': 'keep-alive',
'Accept': 'application/json',
'Sec-Fetch-Dest': 'empty',
'Content-Type': 'application/json',
'Accept-Language': 'en-US,en;q=0.9',
}

data = '{"token":"YOU GOOGLE ID TOKEN HERE"}'

response = requests.post('https://YOUR BASE URL HERE/api/session/google_auth', headers=headers, cookies=cookies, data=data)
from metabasepy import Client

cli = Client(username="fake", password="not_using", base_url="https://YOUR BASE URL HERE")

cli.token = response.json()['id']

gotya:
metabase/metabase#6594

helpful:
https://github.com/googleapis/google-auth-library-python/blob/master/google/oauth2/id_token.py

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

No branches or pull requests

3 participants