nylas/nylas-python

Need client id and client secret in make_google_blueprint

Closed this issue · 2 comments

google_bp = make_google_blueprint(

I believe that client id and client secret need to be passed into make_google_blueprint, otherwise the client id will not be passed to google and an error occurs. Call should be

google_bp = make_google_blueprint(
    client_id= app.config["GOOGLE_OATH_CLIENT_ID"],
    client_secret= app.config["GOOGLE_OATH_CLIENT_SECRET"],
    scope=[
        "openid",
        "https://www.googleapis.com/auth/userinfo.email",
        "https://www.googleapis.com/auth/userinfo.profile",
        "https://mail.google.com/",
        "https://www.googleapis.com/auth/calendar",
        "https://www.googleapis.com/auth/contacts",
    ],
    offline=True,  # this allows you to get a refresh token from Google
    redirect_to="after_google",
    # If you get a "missing Google refresh token" error, uncomment this line:
    # reprompt_consent=True,
    # That `reprompt_consent` argument will force Google to re-ask the user
    # every single time if they want to connect with your application.
    # Google will only send the refresh token if the user has explicitly
    # given consent.
)

@GroveIV Thank you for opening this ticket! We're going to investigate this issue and get back to you with any updates.

@GroveIV thanks for reporting this issue, it's been fixed and will be included in the next release!