access-token

Google API - Oauth 2.0 Auth token flow

情到浓时终转凉″ 提交于 2020-02-06 07:19:44
问题 Context -- I am building a web application that uses the Google Cal and Google+ API. I will need to obtain a refresh token, since once a user authenticates with the site/app, some of the calls happen behind the scenes after they have logged in (and many of them happen after 1 hour, of which the initial access_token is valid for) As I understand it, here is the flow I must follow: Register a Web Application API through Google console - done. Prompt the user to authenticate with my application,

Google API - Oauth 2.0 Auth token flow

纵然是瞬间 提交于 2020-02-06 07:19:21
问题 Context -- I am building a web application that uses the Google Cal and Google+ API. I will need to obtain a refresh token, since once a user authenticates with the site/app, some of the calls happen behind the scenes after they have logged in (and many of them happen after 1 hour, of which the initial access_token is valid for) As I understand it, here is the flow I must follow: Register a Web Application API through Google console - done. Prompt the user to authenticate with my application,

Token authentication - where to store the token

心不动则不痛 提交于 2020-01-30 06:23:11
问题 I am working with PHP and Laravel at the moment, I have a restful api that the user needs to authenticate with to make sure they can only access things they own etc. What I want to know is where should the token from the server be saved on the client? In a session a cookie? The servers database? 回答1: I suggest to go the following route: the user logs into your site and requests a API usage token when a new request to your API comes in, compare the token from the incomming request, with the

Token authentication - where to store the token

安稳与你 提交于 2020-01-30 06:22:25
问题 I am working with PHP and Laravel at the moment, I have a restful api that the user needs to authenticate with to make sure they can only access things they own etc. What I want to know is where should the token from the server be saved on the client? In a session a cookie? The servers database? 回答1: I suggest to go the following route: the user logs into your site and requests a API usage token when a new request to your API comes in, compare the token from the incomming request, with the

Storing oAuth state token in Flask session

五迷三道 提交于 2020-01-30 05:03:47
问题 A couple of tutorials on oAuth use the Flask session to store state parameters and access tokens in the flask session. (Brendan McCollam's very useful presentation from Pycon is an example) I understand that Flask stores the session in cookies on the client side and that they are fairly easy to expose (see Michael Grinberg's how-secure-is-the-flask-user-session). I tried this myself and was able to see the token the expiration, etc. Is it correct to store the state and tokens in the flask

Get Access Token with OneDrive API

风流意气都作罢 提交于 2020-01-25 22:00:06
问题 I am trying to authenticate and to sign to in OneDrive for business in order to get an access token. I have registered my application in Azure Active Directory and I have got my client_Id and my Client_Secret. Base on the OneDrive API Documentation the next step is to login to get the authorization code that will be used to get the access token. I am able to get the code successfully but the next step is a POST with the following parameters: POST https://login.microsoftonline.com/common

How to revoke access token from Google Assistant?

落花浮王杯 提交于 2020-01-25 08:27:46
问题 I'm using oauth implicit flow to authorize google assistant user into the system. The login flow goes like this: If user is logging in for the first time, the assistant redirect it to my service where user provides its credentials and logs in. Upon successful login, my service generates a JWT token and sends it back to the google oauth endpoint. Then user returns to the Google assistant with a message: "Your account has been linked to Google". Now, the big problem is, How can I logout the

Invalid OAUTH access token, when using an application access token, Android

橙三吉。 提交于 2020-01-25 00:29:09
问题 As the title says, when I try to request to get the friends list with the field installed: "me/friends?Fields=installed&access_token=..." I get the following error in my logcat: "Invalid OAuth access token" When looking on the facebook api I see that installed needs to take an application access token. So I generated the application access token using the appId and app Secret using: https://graph.facebook.com/oauth/access_token?grant_type=client_credentials&client_id=APP_ID&client_secret=APP

headers = {“Authorization”: “bearer ” + accessToken['access_token'], “User-Agent”: userAgent} KeyError: 'access_token'

不打扰是莪最后的温柔 提交于 2020-01-24 22:58:12
问题 I found this code in this SO's answer however when I run it I get this error: in redcom.py I have: import time import requests import requests.auth import praw username = 'myusername' userAgent = "reddit natural language processing " + username clientId = 'myclientid' clientSecret = "myclientsecret" password = "mypasswd" #app_uri = http://127.0.0.1:65010/authorize_callback def getPraw(): return praw.Reddit(user_agent=userAgent, client_id=clientId, client_secret=clientSecret) global

Implementing OAuth Refresh Tokens that never expire

丶灬走出姿态 提交于 2020-01-24 12:37:07
问题 In the context of OAuth 2, how does one deal with refresh_token expiry, or lack thereof? I'm using JSON Web Tokens (JWTs) as access_token s with a short lifetime (expires after 20 minutes). From what I understand, this means I shouldn't have to store the access_token , only validate it (and consume the trusted information inside, like scopes). However, I'm wondering how one implements refresh_token s. In my research, I've seen that Google and others have refresh_token s which are good forever