access-token

Migrating existing access tokens to Facebook iOS SDK 3.0

痴心易碎 提交于 2019-12-05 06:22:11
I just overhauled my codebase to use the new facebook-ios-sdk 3.0 (from the previous version, 2.x or whatnot). Everything worked great, until I realized I hadn't accounted for users who had already granted the app permission/logged in with the previous implementation of the SDK. So I tried checking to see if the accessToken was saved in NSUserDefaults, and if so, make a call to open a session: if ([[NSUserDefaults standardUserDefaults] objectForKey:@"FBAccessTokenKey"] && [[NSUserDefaults standardUserDefaults] objectForKey:@"FBExpirationDateKey"]) { [FBSession openActiveSessionWithPermissions

Accessing public Instagram content via Instagram API without expiring accesstoken

痞子三分冷 提交于 2019-12-05 06:12:26
i want to show public contents from instagram related to a specific hashtag (everything works fine with that) but i can't to renew the access_token everytime it expires. ("do not assume your access_token is valid forever." - https://www.instagram.com/developer/authentication/ ) To renew it manually is not an option i have to make sure there is a valid access_token at ANY time without re-authenticating. Any ideas or questions? :) I have one idea, but without API (and access_token ). You can make requests to the web-version of Instagram with ?__a=1 parameter. I do not know how long it will work

Customize Bearer token JSON result in ASP.NET WebApi 2

青春壹個敷衍的年華 提交于 2019-12-05 05:33:55
I walkthrough this official ASP.NET tutorial , and the bearer token is published as below JSON. { "access_token":"boQtj0SCGz2GFGz[...]", "token_type":"bearer", "expires_in":1209599, "userName":"Alice", ".issued":"Mon, 14 Oct 2013 06:53:32 GMT", ".expires":"Mon, 28 Oct 2013 06:53:32 GMT" } I'd like to add user profile properties along with the above resul in order to reduce number of requests from clients. The example is as below... { "access_token":"boQtj0SCGz2GFGz[...]", "token_type":"bearer", "expires_in":1209599, "userName":"Alice", ".issued":"Mon, 14 Oct 2013 06:53:32 GMT", ".expires":"Mon

Oauth 2.0 cannot get an access token from the signed_request 'code' value

狂风中的少年 提交于 2019-12-05 05:14:15
I'm migrating to Oauth 2.0. My current site uses JS SDK, has a fb-login button, then I'm accessing Graph to get the users details. I'm having problems getting an access token to get this data from Graph. One problem could be that JS SDK dialog doesn't redirect my to the URL it says it should i.e. the one with ?code=XXXXXXX that I can then use to get an access token. So I've looked at the php SDK (I'm using ASP) to see how it does it. I've parsed the signed-request value in the cookie, got the value in the 'code' param to add to the token URL but I can't get an access token. These are the

OAuth token security

限于喜欢 提交于 2019-12-05 03:33:16
As far as I know, the OAuth standard is very lax on how OAuth really should behave, but... I store OAuth access tokens for various OAuth services in a database. If these tokens were compromised, could they be used by a third party? I.e., are the given tokens bound to only my api and secret keys? The tokens are tied to a given service and user. With those, one can pretend to be that user. It is not tied to any IP address or device UUID for example (although one could do that as an additional precaution, but that is not part of OAuth). If they were compromised, you'd deauthorize them, thus

Laravel Passport tokensExpireIn seems not working

痴心易碎 提交于 2019-12-05 03:23:51
i'm using Larave 5.4 passport to create SPA application. However, i was able to make authentication work. but access token are always short-lived tokens with 600s expiration time. i could not increase expiration time with: Passport::tokensExpireIn(Carbon::now()->addDays(15)); Passport::refreshTokensExpireIn(Carbon::now()->addDays(30)); it have no effect at all. any help? thanks in advance. Personal access tokens are always long-lived . Their lifetime is not modified when using the tokensExpireIn or refreshTokensExpireIn methods - as explained in Laravel's official documentation ( https:/

The Access Token is Valid but We get OAuthException: An active access token error

落花浮王杯 提交于 2019-12-05 03:15:40
问题 We've been working on an application for about 2 months, and everything was going perfectly. we were using PHP SDK and offline mode in permissions for login But since some days ago after recent changes in Facebook api and removing offline mode we started facing the problem of "Uncaught OAuthException: An active access token must be used to query information about the current user." The main problem is that it does happen after a while working in our app (about 10 mins) but at the same time

Get linkedin Access Token with JavaScript SDK

坚强是说给别人听的谎言 提交于 2019-12-04 23:02:08
I am working on that application allow user to connect to linkedin (using javascript). I want to store access token that I got from IN.ENV.auth.oauth_token because I will use it to post to user's timeline. But when I use this access token to post to Linkedin, I got "Invalid access token" error. Did I use correct access token? How's the correct way to get Access token? Here's my code: $("#linkedin-connect").on('click',function(e){ e.preventDefault(); IN.UI.Authorize().place(); IN.Event.on(IN, "auth", OnLinkedInAuth); return false; }); function OnLinkedInAuth() { console.debug("oauth token:" +

how to get Google plus access token in windows application C#.net

丶灬走出姿态 提交于 2019-12-04 22:07:31
I am preparing a windows application in that I want to use oAuth2 to access info from google plus. But I am getting bad request for my following code.. I am able to create app in google console and fetch the "code" for application access. WebRequest request = WebRequest.Create( GoogleAuthenticationServer.Description.TokenEndpoint ); // You must use POST for the code exchange. request.Method = "POST"; // Create POST data. string postData = FormPostData(code); byte[] byteArray = Encoding.UTF8.`enter code here`GetBytes(postData); // Set up the POST request for the code exchange. request

Storing Twitter access token using Twitterizer

偶尔善良 提交于 2019-12-04 21:52:17
I'm trying to store Twitter access token to my database for a specific user, so he doesn't need to approve the application every time he wants to post a new tweet. I can easily get user access token using Twitterizer, and what I get is OAuthTokenResponse object. It consists of several properties, but for each request (eg. posting a tweet) it asks for OAuthTokenResponse object, so it looks like its not enough to store the Token property only? What's the best way to store this AccessToken? Thanks! You should store the 4 properties returned by the OAuthUtility.GetAccessToken method in your