access-token

How can i make it so logging out doesnt invalidate my Facebook access token?

寵の児 提交于 2019-12-11 16:27:35
问题 Im making an app that returns various Facebook content and need to store a long term access token in a database. I'm aware that its not advisable to use the offline_access permission as it is being removed very soon. The Facebook documentation itself seems very confusing... Theres a blog post from 2011 (https://developers.facebook.com/blog/post/2011/05/13/how-to--handle-expired-access-tokens/) that indicates how to handle invalidated access tokens when a user logs out, but: 1 - It's from 2011

Where should a SPA keep a OAuth 2.0 access token?

烈酒焚心 提交于 2019-12-11 16:02:39
问题 In a Authorization Code Grant flow, once a public client such as a Single Page Application (SPA) obtains a OAuth 2.0 access token, where should the SPA keep it? Storing the access token in locale storage or session storage opens up to cross-site scripting (XSS) attacks, so that should be avoided. Storing the access token in a non-httpOnly cookie also opens up to XSS attacks, so that should be avoided as well. Storing the access token in a httpOnly cookie is not technically possible because

Using a personal access token for azure devops API repository manipulation

只谈情不闲聊 提交于 2019-12-11 14:30:15
问题 I have generated a personal access token from the Azure Devops user interface but am unable to use this to make requests against the Devops API. I have tried many different header fields, but I am always redirected to the log in page as though I hadn't authenticated. token = #Token generated on Devops project page token_bytes = token.encode('utf-8') token64 = base64.b64encode(token_bytes) authorization_string = "basic " + str(token64) repo_endpoint_url = "https://dev.azure.com/{organization}/

Google OAuth 2.0 inconsistent token type?

泄露秘密 提交于 2019-12-11 13:52:02
问题 Google says in its own OAuth 2.0 specs in accordance with the OAuth 2.0 draft that the authorization header should be: Authorization: Bearer {access_token} And indeed it works with the G+ API . But with the Google Calendar API you need to change the Bearer to OAuth ! Authorization: OAuth {access_token} You can try it yourself in the Google OAuth 2.0 Playground. I have discovered this after I hit my head several times against the keyboard. I couldn't find anything about OAuth token type

Generate Access Token and validate against IdentityServer4 through Azure API Management

大城市里の小女人 提交于 2019-12-11 12:17:27
问题 I have an external endpoint which is going to hit the Azure API gateway and that would route it to the backend API which is protected by IdentityServer4 authorization. I am getting the access token if I hit it through the Postman client with the interactive UI from IdentityServer. Is there a way I can get the access token required from the Azure API Management to validate against the IdentityServer4 and append it to the header in the request to the backend API? 回答1: Yes it is possible to

Parse user authenticated using Auth0

守給你的承諾、 提交于 2019-12-11 11:49:57
问题 Hi I'm trying to figure out how to use Parse.com and Auth0 together. When I setup login with Parse.com the currentUser is automatically set and I can use that user to save items specific for that user. But when I implement authentication using Auth0, Auth0 responds with the user info (Auth0 token, fb access token etc) when you perform a successful login, and of course no Parse user was created. So which steps need to be taken to make use of the 'currentUser' object provided by Parse, but use

Google oAuth2 redirect_uri_mismatch in token access

独自空忆成欢 提交于 2019-12-11 10:36:25
问题 I am trying to access token from one-time code using Google oAuth2. But I am getting an error message redirect_uri_mismatch in the response. However i've already added the redirect_uri in console. I have my Authorized redirect uri as: http://localhost:3020/api/users/google_oauth_store_token My request: Request URL = https://www.googleapis.com/oauth2/v3/token?code=xXXXxx&client_id=xxxxxx&client_secret=xxx&redirect_uri=http://localhost:3020/api/users/google_oauth_store_token&grant_type

Google plus for android bad access token

馋奶兔 提交于 2019-12-11 10:35:14
问题 I been following Getting started and sign in to get access_token of user. I do get an access token but when using it i am getting this error: { "error": { "errors": [ { "domain": "global", "reason": "authError", "message": "Invalid Credentials", "locationType": "header", "location": "Authorization" } ], "code": 401, "message": "Invalid Credentials" } } When I am going to apis-explorer and using they token it works just fine. Any ideas what am I missing? This is then URL I am trying. https:/

Generate Access Token In Web Api action method using OWIN and IIS host

痴心易碎 提交于 2019-12-11 10:26:43
问题 I'm trying to generate a token inside Web Api action method based on the code below: private JObject GeneratePaymentTokenResponse(string email, bool rememberMe) { //var tokenExpiration = rememberMe ? TimeSpan.FromDays(14) : TimeSpan.FromMinutes(30); var tokenExpiration = rememberMe ? TimeSpan.FromMinutes(30) : TimeSpan.FromMinutes(5); ClaimsIdentity identity = new ClaimsIdentity("CustomType", ClaimTypes.Email, ClaimTypes.Role); identity.AddClaim(new Claim(ClaimTypes.Email, email)); var props

Laravel 5.1. Token from and session token are different using mobile browser (login action)

半世苍凉 提交于 2019-12-11 10:19:51
问题 I have got this login form: <form class="form-horizontal" role="form" method="POST" action="{{ url('/auth/login') }}"> <input type="hidden" name="_token" value="{{ csrf_token() }}"> ... I login with no problem using a browser from a desktop (IE, Chrome, Firefox, ...), but the problem comes from mobile device (android platform). I got this exceptión: TokenMismatchException in VerifyCsrfToken.php line 53. When I went to VerifyCsrfToken.php I discovered that the token passed from the form and