Code Monkey home page Code Monkey logo

Comments (7)

cleverbeagle avatar cleverbeagle commented on May 21, 2024

Hi @pilarArr having trouble confirming this one. When logging in with multiple Google accounts and a fresh Meteor.users collection, the username is displaying as expected. Can you provide a screencap/video of what you're experiencing?

pup-google-login

from pup.

pilarArr avatar pilarArr commented on May 21, 2024

Hi @cleverbeagle,
Sorry for the delay, this would be the screencap of what I'm seeing, I also deleted the users collection before trying like you said and still nothing. I also tried with different google accounts and still got the same.

movie1

from pup.

pilarArr avatar pilarArr commented on May 21, 2024

Also this is the entry that is created in the Mongo Collection.
Because my profile is empty every time, the name is always empty and this only happens with Google, with Facebook it works.
screen region 2017-08-09 at 08 42 08

from pup.

aferreol avatar aferreol commented on May 21, 2024

Pretty sure It's because OAuth uses Google (plus) to retrieve first and last name, and you don't have any.

from pup.

cleverbeagle avatar cleverbeagle commented on May 21, 2024

Interesting! Kind of wonky on Google's part, but makes sense as to why we'd see the difference. I'm not sure if we should qualify this as a bug since it's technically working as expected. Maybe the fix here is to just display the email address if we detect an empty name string?

P.S. @pilarArr and @zeiitoun do you have an email I can get in touch at (or could you email [email protected])? Wanted to see if either of you would be interested in helping with Pup.

from pup.

aferreol avatar aferreol commented on May 21, 2024

In the meteor documentation, it's specified that you can add options for google services when you call Meteor.loginWithGoogle. (here)

This options may include Google’s additional URI parameters (https://developers.google.com/identity/protocols/OpenIDConnect#authenticationuriparameters) such as the "scope" that might be interesting here.

You could modify the login scope to "https://www.googleapis.com/auth/plus.login"? Which will ask the user to subscribe to Google Plus if he doesn't have any account.
(bonus point : It's the recommended login scope, meteor should change to this one)

(I will email you tonight or tomorrow, love your project ;))

from pup.

pilarArr avatar pilarArr commented on May 21, 2024

I went around this by changing the option requestPermissions to ['email', 'profile']. That fills the profile and fixes the empty name.

I'm not sure everyone wants to have a Google Plus account to sign up with their Google account, seems like an unnecessary extra step to create a Google Plus account just to sing up with Google, but that's just my newbie opinion πŸ˜•

P.S. @cleverbeagle I've sent you an email πŸ˜„

from pup.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.