How to tell if a user is using google account or G suite for Education account? - google-oauth

I am using Google OAuth2.0, the requirement is only let G suite for Education account login, so I want to know what type of account user is using during the authentication.
The login part is finished, I get access token and refresh token, I asked for two scopes https://www.googleapis.com/auth/userinfo.profile, https://www.googleapis.com/auth/userinfo.email
I checked the user profile, which can't help me to identify the type of account.
Can I differentiate these two type of account by only require above two scopes? if not, what other scopes I need to require and what API I need to use?
I found one example online, https://www.brainpop.com/ which supports what I mentioned.
The website only asks for Basic account info such as View your basic profile info and View your email address. When I log in using my personal Google account, then the login will be denied and tell me it's not G-suite education account.
Appreciate anyone's help.

check email
https://www.googleapis.com/auth/userinfo.email
IF EMAIL HAS CUSTOM DOMAIN LIKE ABC.COM then its gsuite
if it is just gmail.com its not gsuite

What I did do when I needed to know if the user was a G suite for education user was to also request the scope 'https://www.googleapis.com/auth/classroom.profile.photos'. If I remember correctly only users with a for education account would be asked for giving that permission. You can probably use any scope from the classroom API to (https://developers.google.com/classroom/reference/rest/).
I don't have this integration with Google anymore, so haven't tested it in about a year.

Related

How to fix login process to dialogflow after I have attached gmail to my non-gmail account?

I had a Google account based on not-GMail-account. I had another email company's email as a login to my Google Account (myemailhere#ukr.net). And I used this Google account to login the dialogflow.cloud.google.com.
Today Google suggested me to create a #gmail.com account and attcach it to my myemailhere#ukr.net Google Account. I have confirmed and created the myemailhere#gmail.com.
Using both of this logins (myemailhere#gmail.com and myemailhere#ukr.net) I am still able to login my cloud.google.com Profile. But when I try to login the Dialogflow Profile (dialogflow.cloud.google.com) - I see the eternal loading animation (or a totally blank page). There is no errors about password or something like this. Just login process after I submit the password and then white page. This behavior I see on all my devices, while I trying to login with myemailhere#gmail.com or myemailhere#ukr.net
And I see some 400 errors in web console (if it matters).
Could you please help me to fix this and get access to DialogFlow?
Screen that I see after the login and password entering
Do you have the project owner role for the mentioned username that is registered on your project in the GCP console (not Dalogflow Console)? Here is a list of roles related to Dialogflow that grant access to its Console.
Note that some of these roles give full access or edit access while other roles have permissions that simply gives view access to the Dialogflow Console.
If you are missing any of these then simply assign on your GCP project's console.
Assigning roles as described above did not work for me. Solution was to delete gmail email service from the account.
Instructions here
If you would like to use gmail, do NOT add gmail to your existing google account. You should instead create a seperate google account and use gmail from this seperate account

Is there a Teamspeak Authentication I can use for my Website?

I want to connect the Users from my website with the TeamSpeak server, that i can automatically grant rights, ban users and so on.
At the moment the User has to enter his Ts UID on my website, so that i can search him in the TS database.
But for some time now, you can login to the TeamSpeak client with a TeamSpeak account.
Is there a way that the users can login on my website with this Teamspeak account like with Google, Facebook and so on?
And am I able to find them on my TS Server when they are logged in with that account?
TeamSpeak's myTeamSpeak system was definitely not designed for any oauth type functions. However TeamSpeak has a brilliant plugin SDK, serverquery and clientquery available to interact with teamspeak.
I would recommend you "link" users' TeamSpeak UID's like https://ts-n.net/ranksystem.php does via a user's IP address. From there you can simply accept the login, or you can take it a step further and sending a message with a "activation code" via one of the ways mentioned above to interact with teamspeak for additional security.
From what I understand, you want to find online user's that are logged in to your website through a form of authentication using teamspeak. I have no idea what you mean by "them", but teamspeak's serverquery lets you search through every single client in it's database, and whatever you are looking for is there or in your logs folder.
Sorry I could not be more helpful, I will edit this/respond when/if you clarify your question.

Is there a way to verify social media links of a user

I am project owner of a community application built on Ruby on Rails: My question is about social network verifications.
We ask the user to add his/her social media profiles to his public profile of the community.
At the moment the user can simply put e.g. his/her Facebook URL to his profile, same for pinterest profile, Twitter and so on, but there is no validation for the urls, at the end of the day the user can add anything he wants, also blablabla
Is there a way to verify if his/her entries are valid?
Token, API, validation test?
Any hint is welcome,
Thank you
Most Social Networks have APIs and you can ask the user to link his account on your application to his/her account on a specific network if he/she wants to show profiles on these Networks.
For Example, you can use the Ruby Koala gem to communicate with the Facebook API. You can create a Facebook Application and link it to your website, then ask the user to grant your Facebook App the minimal default permissions, these will be sufficient to get the Facebook profile URL of the account that was acutally linked, i.e verified.

Important ask about authentication

could you tell me if when somebody is on my application on Facebook, then I can know what ID number this user has or what email this user uses to login on Facebook? It is important for me, because i would like to know if i can authorize my apps user without oAuth2.0.
you need to get the permission befoer you get the id / email.
As of today, if you don't want to use OAuth 2.0, simply handle that via the legacy authentication flow

Linkedin API: how to use my login credential in my access token

I'm building my website to pull out my own linkedin profile info. And it is working but when a visitor comes to the site, they will have to login to see my profile info displayed on my page. This should be a public website and I don't want visitors to log in to their linkedin account in order to see my public page.
Is there anyway to do this (so that visitors can see my info without having to be logged in) ? Thank you
NOTE: I'm using their REST API by the way.
Simple code
Per the documentation (section #1, bullet point 3), it is not possible to share your profile information via the API without the user both authenticating your LinkedIn application that is pulling the info, and also the authenticated user then being connected to you in some way. From that document, "Each user must grant your application access to their LinkedIn network and they can only see data from their own LinkedIn network. For example, you cannot gather information about a LinkedIn member in one user's LinkedIn network and show that information to other users"
In short, the REST API is probably not the way to go to expose un-authenticate user's to your profile. What you might want to do is use one of the plugins, such as the Member Profile plugin.