I'm successfully using ASP.Net MVC's OAuthWebSecurity to authenticate a Twitter user. I'm using LINQ to Twitter to interact with Twitter's API to retrieve data about user and post tweets. LINQ to Twitter requires the ConsumerKey and ConsumerSecret in order to interact with Twitter API. You have to supply ConsumerKey and ConsumerSecret when registering TwitterClient with OAuthWebSecurity. How do I retrieve ConsumerKey and ConsumerSecret from OAuthWebSecurity?
OAuthWebSecurity is only for authentication. You need authorization to read the timeline and post tweets.
You should write your own authorization code to retrieve the consumerkey + secret.
You need to go on https://dev.twitter.com/apps a create your twitter app there. They will then give you the Consumer key and Consumer secret.
Related
Is Instagram API compatible with OpenID Connect ? I want to implement instagram login functionality with AWS Cognito.
Not as far as I know. It does support simple OAuth2 and has endpoints like /authorize etc. but there is no OIDC discovery document (.well-known/openid-configuration). So, you won't be able to directly integrate it with AWS Cognito as an OIDC Auth provider.
What you can do is use the Custom provider option (developer authentication) and manually get an id. Use your application to get Instragram user's id -
authenticate using OAuth2
get an access token
use the sub claim as an id or use the access token to get some other detail and use it as an id)
Once you get the data you want to use as an id, use as developer user identifier in GetOpenIdTokenForDeveloperIdentity to get Cognito Identity Id and Token.
Hi iam trying to access YouTube data API by OAuth 2.0 authentication.I obtained access token and refresh token successfully.Now i am trying to upload video by using the following link .
https://developers.google.com/youtube/v3/code_samples/java#upload_a_video
I am unable to create credentials.pls suggest me the what is the userid i need to pass and from where i can get the userid to authorize method.
Credential credential = Auth.authorize(scopes, "uploadvideo");
I created an app in whootin.com and I have
Consumer Key
Consumer Secret
Request Token URL
Access Token URL
Authorize URL
I want to authenticate user those who are having whootin account and display their information in my site.
Because OAuth is only a specification, there are a lot of differenct clients you can use. For example: https://github.com/vznet/oauth_2.0_client_php.
For working with Google using 1.0 protocol, applications were required to be registered using https://accounts.google.com/ManageDomains which provided a ConsumerKey and a ConsumerSecret to access feeds.
Newer application registrations are instead done using https://code.google.com/apis/ which provides ClientID, RedirectURL etc. (but not consumer key) as it is based on OAuth 2.0
Question: Is it possible to run an application created with Google APIs (OAuth 2.0) to work with an 1.0a OAuth flow? If yes, what field should be considered as a ConsumerKey?
It is not recommended that you use OAuth2 Registration for OAuth1 flows. The OAuth1 approval page will not look very nice to your users. Google's consumer_key and client_id are roughly equivalent, However, Google's OAuth1 approval page shows the raw value of consumer_key (client_id). The Application brand info will not be shown and instead you'll see the client_id value. 12345.apps.googleusercontent.com.
If you want to do the OAuth1 hybrid protocol, OAuth2 is a naturally 'hybrid' protocol and can do identity as well as data access control.
I am attempting to use Google's OAuth services for iOS and am passing the following scopes into the auth mechanism:
https://www.googleapis.com/auth/plus.me
https://www.googleapis.com/auth/userinfo.email
https://www.googleapis.com/auth/userinfo.profile
As far as I can tell the login is working correctly (I am prompted for my Google credentials); I can parse out my email from the GTMOAuth2Authentication object, but my question is, how do I get the data from "userinfo.profile", i.e., Name, Gender, etc.
Thanks
You may use the access token to acquire the user's basic profile information by calling the UserInfo endpoint.
See https://developers.google.com/accounts/docs/OAuth2Login#userinfocall