oauth-2.0

How does Google Sign in for Android work without a redirect uri?

允我心安 提交于 2020-04-18 05:36:16
问题 The Google Sign in library on Android works without specifying any redirect uri. Why is this the case? To which endpoint does Google send the access code to after the user logs in? And how does it redirect the user back to the app? Thanks. 回答1: Now I see, the redirect uri is in fact the app itself, using a uri that points to a page on the app, not to any website. The redirect uri can be set up in the Android app by using the information here: https://developer.android.com/training/app-links

Client Credentials Flow for Azure DevOps

家住魔仙堡 提交于 2020-04-18 03:49:53
问题 I have been looking at this issue for days and I know from experience that I usually work these things out but this time I have hit a brick wall. Scenario I have a python app that gets instantiated inside an Azure DevOps YAML pipeline. The app calls the Azure DevOps REST API to create a repository The app uses a PAT (personal access token) to authenticate Firstly issue is, a personal access token is connected to me as a human user. If I leave the company the PAT will be revoked which is not

how override spring framework beans?

别说谁变了你拦得住时间么 提交于 2020-04-17 22:52:08
问题 I want to customize some of the codes of OAuth authorization server provided by spring security. the code responsible for generating /oauth/authorize is a bean named AuthorizationEndpoint. in AuthorizationServerEndpointsConfiguration class the following code creates a bean of AuthorizationEndpoint class: @Bean public AuthorizationEndpoint authorizationEndpoint() throws Exception { AuthorizationEndpoint authorizationEndpoint = new AuthorizationEndpoint(); FrameworkEndpointHandlerMapping

How to do Silent Refresh manually in implicit flow using iFrame (using Identity Server 4, Angular 2+)

浪子不回头ぞ 提交于 2020-04-17 22:16:50
问题 I am trying to do silent refresh using iFrame with Implicit Flow. I do not want to use automaticSilentRenew as it is not efficient. I am using oidc-client library in Angular 8 on the client side. So, there are two things which are happening : 1.) I am using auth-guard to secure the important components. In auth-guard i am checking if the token is valid, in case it's not then i am calling signinRedirect of the auth-service class to fetch the new token. 2.) I am not guarding the secure API

C# OWIN authentication best practice

痞子三分冷 提交于 2020-04-17 22:04:14
问题 We have implemented Owin authentication in C# without refresh token, however, until recently we started facing token expiry issue on user interface, we have kept token expiry as 20 mins, now we need to get rid of this issue, so, we thought of two solution. First solution is to add a validation before every api call whether the token is going to expire, if it is then generate a new access token using refresh token. Second solution is to add a custom logic on client side where it will keep on

koa passport oauth2 save token to state

心已入冬 提交于 2020-04-17 19:05:40
问题 So I'm trying to save an access token to the state within Koa, just for use later and saving having to pass it around the client. Following the passport oauth2 documentation for Koa, I'm struggling to persist anything to ctx.state ... Koa / passport oauth2 setup: server.koaApp.use(koaSession( { key: sessionKey, rolling: true, maxAge: sessionMaxAge, sameSite: 'none', secure: true, // @ts-ignore domain: undefined }, server.koaApp, )); // set up passport sessions here function createPassport() {

koa passport oauth2 save token to state

无人久伴 提交于 2020-04-17 19:05:31
问题 So I'm trying to save an access token to the state within Koa, just for use later and saving having to pass it around the client. Following the passport oauth2 documentation for Koa, I'm struggling to persist anything to ctx.state ... Koa / passport oauth2 setup: server.koaApp.use(koaSession( { key: sessionKey, rolling: true, maxAge: sessionMaxAge, sameSite: 'none', secure: true, // @ts-ignore domain: undefined }, server.koaApp, )); // set up passport sessions here function createPassport() {

OpenID redirect vs bearer

廉价感情. 提交于 2020-04-16 08:22:08
问题 I'm developing a microservice in C++ (for low latency reasons), and I'm beginning to dive into OpenID and Keycloak. Developing in C++ means I've almost no library support for OpenID, but I've (hopefully) the all the low level details working (like proper JWT verification). I've to do all the communication flows and redirects myself. So much as a background. Keep that in mind because I need to know and implement details which usually a library will hide for a developer. There are three parties

How to authorize scope for GAS to edit Google Spreadsheets

♀尐吖头ヾ 提交于 2020-04-16 03:12:08
问题 I have a Powershell script that calls a Google App Script function. When I run the Powershell script I can see the following error on the Error Reporting on my GCP project: Exception: You do not have permission to call SpreadsheetApp.getActiveSpreadsheet. Required permissions: (https://www.googleapis.com/auth/spreadsheets.currentonly || https://www.googleapis.com/auth/spreadsheets) at toSpreadsheet (Código:3) at fromPS (Código:14) I have understood that I have to authorize the scope, so I've

Azure AD - missing roles claim in the token

非 Y 不嫁゛ 提交于 2020-04-13 07:35:12
问题 I've set up authentication through Azure Active Directory (AAD) and everything works fine (I receive my access and refresh tokens). I've read about app roles and I would like to use them (for simplicity, let's assume I want to have Admin and User roles). I've followed the official documentation (which is missing the last part ..) here. Unfortunately, the tokens don't contain the 'roles' claim. Here is my setup in more detail: 1) I have Azure AD app called TestAuthApp and I added roles to the