Hey is there anything in my backend tpep recipe that i can insert so that way google asks me for a s...
b
Hey is there anything in my backend tpep recipe that i can insert so that way google asks me for a specific account to use instead of my previously selected/logged in account on google. Like bringing me to the google account selector page instead
r
hey @bladerpc
b
https://stackoverflow.com/questions/37711665/forcing-a-user-to-choose-an-account-via-google-oauth2 , i see this as a solution but curious if we had any examples before i dig further
r
yea, thats right
you can add a custom authorization query param in the google provider config on the backend.
which golang sdk versino do you use again?
b
hmm haha it's probably overdue for an upgrade huh
v0.12.7
r
try something like this:
Copy code
thirdparty.Google(tpmodels.GoogleConfig{
                        // We use this for websites
                        IsDefault:    true,
                        ClientID:     "...",
                        ClientSecret: "...",
                        AuthorisationRedirect: &struct{Params map[string]interface{}}{
                            Params: map[string]interface{}{
                                "prompt": "select_account+consent",
                            },
                        },
                    }),
b
Thanks I will report back tommorow
4 Views