Add users and teams to a repository through the GitHub API - api

I would like to add users or teams to GitHub repositories. I wasn’t able to find any possibility in the docs. Is there really no way to invite users even if the user is logged in through the oauth?

Related

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

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.

How do remove a Instagram permission from my website?

Instagram reviewed my page and everything was fine. Now my page is live and a lot users told me that they don't like that when they connect with their Instagram that we want permission to follow/unfollow.
In easy words, I want that my Users don't have to give me permission for follow/unfollow. But I can't find a way to remove it on Instagrams Dev page.
From their page here:
That page has been updated. Here is archived version of original page where it says the following:
relationships - to follow and unfollow accounts on a user’s behalf
There is dedicated permission to just that - following/unfollowing accounts. Just remove request for that permission from your app at the time of authorization.

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.

Meteor Github authorization

I am using the meteor accounts-github module to handle my authentication/account creation in my application.
I want to ensure that any new user who attempts to sign into the application is a member of a particular Github organisation. I also want to verify this not just when the user is first created, but on every sign in. If the user has been removed from this Github organisation then they should not be able to sign in to my application.
Essentially, I am adding some admin functionality to a website, and I only want Github users who are members of a particular organisation to be allowed to sign in and perform this admin functionality (such as update some basic content).
Is there a way to perform this Github API call on every user creation and sign in event?
you will need to customize the authentication a bit, checkout my project:
https://github.com/534N/miProfile
I implemented it so that only github account is accepted.

How to get email id of logged in user in Yii?

I am implementing login through social networks in my Yii site. I am using gmail, linkedin, twitter and facebook. I need to get the email of the users who are logging in to my site using these networks. I am able to get the email of the facebook user. But not the other networks. How can I get it ?
This is not a Yii specific question (imo) but for the legacy of actually searching, people might end up on this post, looking for a Yii solution:
You should have a look at the yii-eoauth extention.
You will need to do the handshakes first to authenticate the users and afterwards you will be able to get the required details.
oAuth for Facebook
oAuth for twitter
oAuth for Google
oAuth for Linked In