access-token

Cannot get oAuth2 Access Token for Google Analytics API

偶尔善良 提交于 2019-12-04 09:46:37
I am using Rails + Garb Gem (Sija Branch) + omniauth-google-oauth2 Gem and I can successfully authenticate with the Google Analytics API and extract data that our app is generating when using a user login, e.g.: Garb::Session.login('USERNAME', '<PASSWORD>') I can then use Garb to connect to the Analytics Profile I want and pull the data from it and display some charts on a webpage. This all works fine. However, I want to use oAuth2 to authenticate with Analytics which is why I had to install the Sija branch of the Garb Gem from Github (it supports oAuth2) and I also installed the omniauth

How to make Google sign-in token valid for longer than 1 hour?

三世轮回 提交于 2019-12-04 08:12:46
问题 I have implemented google sign-in successfully. I am able to authenticate user and in response I receive token. However the token expires in 1 hour. expires_in: "3600" I tried searching in the docs - https://developers.google.com/identity/sign-in/web/reference - but cannot find a paramenter to extend the lifespan of the token. What I'm actually trying to do? https://developers.google.com/identity/sign-in/web/backend-auth after a user successfully signs in, send the user's ID token to your

Facebook PHP SDK dealing with Access Tokens

烈酒焚心 提交于 2019-12-04 07:58:59
I have crawled around lots of various answers but am still a bit confused with how I should be dealing with facebook access tokens . One of the main problems I'm having is due to what information is being stored in my browser. For example, I log onto the app, the token expires, I can't logon again unless I clear cookies/app settings in browser. I stumbled across this thread: How to extend access token validity since offline_access deprecation Which has shown me how to create an extended access token through php. My questions are: 1. Do I need to store the access token anywhere? 2. What happens

Using the YouTube v3 Data API for .NET, how is it possible to get a refresh token?

非 Y 不嫁゛ 提交于 2019-12-04 05:44:58
问题 I need to be able to use a refresh token to be able to re-authenticate a token after the access token has expired. How can I do this using the C# v3 API? I've looked at the UserCredential class and AuthorizationCodeFlow class and nothing is jumping out at me. I'm using the following code to authenticate it originally. var result = await new AuthorizationCodeMvcApp(this, new AppFlowMetadata()). AuthorizeAsync(CancellationToken.None); if (result.Credential != null) { var service = new

Microsoft bot framework broke on its own [closed]

眉间皱痕 提交于 2019-12-04 05:06:06
Closed. This question is off-topic. It is not currently accepting answers. Learn more . Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 2 years ago . I am getting this for my token request: { "error": "invalid_request", "error_description": "AADSTS90002: No service namespace named 'botframework.com' was found in the data store.\r\nTrace ID: d164a5d4-2c28-4491-bd88-1f8b31b52800\r\nCorrelation ID: 3ab5127e-690e-40b6-a433-2986bd711541\r\nTimestamp: 2017-07-25 18:38:00Z", "error_codes": [90002], "timestamp": "2017-07-25 18:38:00Z", "trace_id":

Saving credentials / token in a cookie?

好久不见. 提交于 2019-12-04 03:33:05
问题 I have managed to get working the authentication which i know return a token (JWT) to the client. This token has an expiration date/time so I was thinking about saving the token in a cookie so future logins were authenticated but this is probably not going to work. I then though about saving the username and password in a cookie although i know this isn't recommended?? Currently i have a form that accepts a username and password, a successful login will provide a token which is used to access

Spring Boot: Full authentication is required to access this resource

若如初见. 提交于 2019-12-03 23:42:40
I am doing example of Spring Boot Security with wso2is server from this post https://github.com/angel-git/wso2is-springoauth , when I am trying to access resource with access token I am getting {"error":"unauthorized","error_description":"Full authentication is required to access this resource"} I am generating access token by: curl -u CLIENT_ID:CLIENT_SECRET-k -d "grant_type=password&username=admin&password=admin" -H "Content-Type:application/x-www-form-urlencoded" https://localhost:9443/oauth2/token and accessing resources by: curl -H GET "Authorization: ACCESS_TOKEN" http://localhost:8080

Extend auth token without refreshing the page

天涯浪子 提交于 2019-12-03 21:07:48
Users want to use my facebook app for many hours without refreshing the browser. But token expires in 2 hours. Now I ask users to refresh the page but that's annoying. I don't want to ask offline access permissions because it will scare some users. The best solution will be somehow "relogin" and get new token without refreshing the page. Is it possible? I would subscribe to the expiry trigger (I think this is authResponseChange), then automate another login check. It won't be a perfect solution as it could trigger a pop up (if they have logged out for example) automatically, which a lot of

How to know if Access Token expires in Google Api PHP

一世执手 提交于 2019-12-03 20:33:19
How will I know if my access token has expired. I'm using try and catch try { $result = file_get_contents('https://www.googleapis.com/calendar/v3/calendars/primary/events?access_token='.$accesstoken); print_r($result); } catch(Exception $e){ echo "Get new token"; } but still it gets error from the file_get_contents then prints "Get new token" If I want to use curl $ch = curl_init(); curl_setopt($ch,CURLOPT_URL,'https://www.googleapis.com/calendar/v3/calendars/primary/events?access_token='.$accesstoken); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER,

After disabling offline_access and removing the app from app settings I no longer get an extended access token

♀尐吖头ヾ 提交于 2019-12-03 20:25:29
** Looks like this was a bug that Facebook has since fixed. I disabled offline_access so that I could get extended access tokens without asking for the offline_access permission. While testing, it seemed to work fine at first. I got a token that expired in 60 days. Then I removed the app from facebook's app settings so I could test. As soon as I removed it, I started getting tokens that expire in 2 hours. Is this a bug? Or maybe this is a security thing like as soon as the app is removed, a flag is set not allowing extended tokens? Someone from Facebook please help me. Edit : I forgot to