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

Login with Google Auth #11

Closed
fabiobeoni opened this issue Aug 20, 2018 · 3 comments
Closed

Login with Google Auth #11

fabiobeoni opened this issue Aug 20, 2018 · 3 comments

Comments

@fabiobeoni
Copy link

Hello adasq,
thanks for this module, really nice and interesting.

I'm wondering if it is possible to skip login with password if the user is already logged with Google Auth.

Thanks, cheers.

@adasq
Copy link
Owner

adasq commented Aug 20, 2018

You can always pass cookies string instead of email/password pair.

@fabiobeoni
Copy link
Author

fabiobeoni commented Aug 24, 2018

Hi,

using alerts.configure({cookies:xxxxxx}) I get a JSON parsing error into api.js file:

function parseCookies(cookies) {
    const str = new Buffer(cookies, 'base64').toString('ascii');
    return JSON.parse(str);  **<===== PARSE ERROR HERE**
}

The cookie is generated by Firebase Admin SDK (since I use Firebase with Google Auth to login users), as described here.

@adasq
Copy link
Owner

adasq commented Aug 24, 2018

alerts.configure({cookies:xxxxxx}) requires cookie generated from the lib, retrived using alerts.generateCookies. You can not pass there any other cookies, including side services such as Firebase.

more here:
https://github.com/adasq/google-alerts-api#generate-cookies

Unfortunately there is no other way to authenticate.

@adasq adasq closed this as completed Aug 31, 2018
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

2 participants