Get user profile info instead of user card with Google Identity Toolkit - google-identity-toolkit

How do I get the user profile information such as user name, email id, profile picture, basically all the information that is displayed in the user card, in my Javascript client?
I do not want to use the default user card that is displayed for a signed in user while using the Google Identity Toolkit.
I cannot find this information in the official documentation. The documentation does say that we can customize the look and feel of the user card, but I could not figure out how to get the profile information, which is displayed in the user card.
I'm using my own Login and Logout buttons. I would like to handle the display of user profile information in my own way too.
My application is hosted on GAE with Java.

You can use the java server library to parse the gitkit id token and retrieve all the information you need:
https://github.com/google/identity-toolkit-java-client/tree/master/src/main/java/com/google/identitytoolkit

Related

How to set up registration with email (no password) and display name in firebase?

I want to set up authentication with email (used to receive a link) and display name only, without password. However, from the documentation I only found createUserWithEmailAndPassword. I tried auth().sendSignInLinkToEmail, which enables me to sign in, but it can't create new user in the database.
You're looking for email link authentication. See the Firebase documentation for email link authentication for full details.
There won't automatically be a display name with this form of authentication, but you can set the display name of your choice in the user profile. See the Firebase documentation on updating a user profile for details on that.

asp.net oauth build in facebook authentication

how to finish off logging in with facebook account (and keep those details in membership db). I was reading around that one needs to get user's email, of course adding any email or name in txt box will not validate ... however it is possible to add it as another service after user logged in with any other method like google or so...
so how do i change the code to get user's email pulled from fb whilst using built in oauth model in .net 4.5

How to - Facebook Connect with existing user table

I have a registration-login system on my own website yet I want to add Facebook Connect too. I have some required parts of my user table as:
Username
Password
Email
The first thing that came to my mind is, setting userId as username, userId#facebook.com as email and setting the password to null and check if a record exists with these details in my user table. If not insert a new user with these details, if exists return that user details.
Is this a good design? How should I connect facebook connect to my website?
Thank you
I would suggest you to take this into a more deep ASP.NET, and start an MVC project
then use the Microsoft Facebook API SDK to play around with the API, it's very easy and because they are using the new dynamic type, now that Facebook changed the Open Graph, it will continue to work great as well.
in your login page, add a facebook login button and ask for permissions, for example:
<fb:login-button perms="email" size="medium">
redirect-uri="http://yourdomain.com/FBLogin/"
Subscribe using Facebook</fb:login-button>
in your FBLogin controller, login the user using the FB credentials, if the user uses your normal form, use the normal login
If you create a custom MemberShip Provider, you can easily use that for both accesses... I write a simple start to a custom Membership provider here

Can the Facebook C# SDK support these typical site login/registration scenarios?

I want to support the following scenarios on my ASP.NET MVC website:
First time visitor wants to
register, via facebook connect. I'd
like the user to have an entry in my
user membership table - so I have
them enter a username/password
(email gets populated via facebook
connect).
Registered user returns to my
site, logged into facebook already.
I'd like my site to see they're
logged into facebook already and
auto log them into my membership
system.
Registered user returns to my
site, but is not logged into
facebook. I'd like to give them two
options: to log into my site
directly or use facebook connect.
Extra:
After a user has connected their
facebook account to my site, I'd
like to use their facebook profile
photo throughout my site where the
user has participated.
I'd also like to post a bit of text, maybe even a photo, to the user's wall (when they perform an action of course).
Couple questions:
What should I store to tie the user's id in my membership system to their facebook account? I'm assuming it would be their facebook user id.
Can this facebook C# SDK handle these scenarios?
Yes you would store their Facebook Id and Yes the API can support this.

After facebook login how to get User Information using javascript SDK in asp.net application

I have to implement facebook login and also want to get logged in user's information like birthday, firstname, Email address.
I have already done some other stuff like recent activities etc of facebook using javascript SDK of facebook.
i am developing application in ASP.Net (C#).
How can i get user information, Please provide me any idea.
Once the user's logged in and you asked for extended permissions (you can use Javascript to do that) you get an access token and then you can call the Facebook graph API. This is server side.
FB do not offer a C# SDK for their API so you will have to find one (or make you own)
see http://developers.facebook.com/docs/api

Resources