oauth-2.0

Facebook OAuth security using passport-facebook

强颜欢笑 提交于 2021-02-06 09:31:58
问题 I am currently using a client-side React component to have a user login to Facebook via OAuth in my application. On the server-side, I use the npm package passport-facebook-token to validate the authenticity of the accessToken after a successful client-side login. One practice I do not see often is in addition to asking Facebook if the accessToken is valid, shouldn't the server also check if the email provided by the client's payload matches the e-mail coming back from Facebook? Allow me to

Facebook OAuth security using passport-facebook

守給你的承諾、 提交于 2021-02-06 09:31:14
问题 I am currently using a client-side React component to have a user login to Facebook via OAuth in my application. On the server-side, I use the npm package passport-facebook-token to validate the authenticity of the accessToken after a successful client-side login. One practice I do not see often is in addition to asking Facebook if the accessToken is valid, shouldn't the server also check if the email provided by the client's payload matches the e-mail coming back from Facebook? Allow me to

Refresh tokens using owin middleware and IdentityServer v3

若如初见. 提交于 2021-02-06 05:40:52
问题 I've recently setup IdentityServer v3 and its running like a dream, however I'm having troubles with the OWIN middleware. I would like to use the hybrid flow so I can refresh tokens in the backend without the user having to redirect back to the IdentityServer to get a new access token every 5 minutes (which is also odd as its set to have a lifetime of 1 hour on the server). I'm using the following config in startup and I'm getting the tokens fine, but it never seems to try and refresh the

Refresh tokens using owin middleware and IdentityServer v3

 ̄綄美尐妖づ 提交于 2021-02-06 05:38:24
问题 I've recently setup IdentityServer v3 and its running like a dream, however I'm having troubles with the OWIN middleware. I would like to use the hybrid flow so I can refresh tokens in the backend without the user having to redirect back to the IdentityServer to get a new access token every 5 minutes (which is also odd as its set to have a lifetime of 1 hour on the server). I'm using the following config in startup and I'm getting the tokens fine, but it never seems to try and refresh the

Refresh tokens using owin middleware and IdentityServer v3

生来就可爱ヽ(ⅴ<●) 提交于 2021-02-06 05:36:26
问题 I've recently setup IdentityServer v3 and its running like a dream, however I'm having troubles with the OWIN middleware. I would like to use the hybrid flow so I can refresh tokens in the backend without the user having to redirect back to the IdentityServer to get a new access token every 5 minutes (which is also odd as its set to have a lifetime of 1 hour on the server). I'm using the following config in startup and I'm getting the tokens fine, but it never seems to try and refresh the

Refresh tokens using owin middleware and IdentityServer v3

佐手、 提交于 2021-02-06 05:35:50
问题 I've recently setup IdentityServer v3 and its running like a dream, however I'm having troubles with the OWIN middleware. I would like to use the hybrid flow so I can refresh tokens in the backend without the user having to redirect back to the IdentityServer to get a new access token every 5 minutes (which is also odd as its set to have a lifetime of 1 hour on the server). I'm using the following config in startup and I'm getting the tokens fine, but it never seems to try and refresh the

OAuth2 with Spring Security - InsufficientAuthenticationException

 ̄綄美尐妖づ 提交于 2021-02-05 11:31:06
问题 i am currently working on a project involving spring security (for OAuth2). We are using the authorization_code flow. However when the client hits the AuthorizationEndpoint (/oauth/authorize) we get an "InsufficientAuthenticationException". This may be due to an external system which is also involved in this flow which performs a redirect for the client, sending him to the /oauth/authorize endpoint. From what I understand by looking through the debug logfile and from reading the source code,

How to integrate oAuth login with a packaged electron app

佐手、 提交于 2021-02-05 10:48:43
问题 I have been working on a new electron app with react that uses the Spotify API. I am using oAuth to authenticate with Spotify and a return an access token, this why fine in a local dev env as the app if running on the webpack dev server and can provide a callback url. However the when the electron app is packaged up and installed it is no longer using the dev server and the JS bundles are packaged up with the app. At this stage how am I supposed to hit the oauth server and return a valid

Why does Google provide a client secret for a Native application?

[亡魂溺海] 提交于 2021-02-05 05:47:29
问题 I'm writing a native application that works against a Google API. Upon registering my application, and despite its explicit designation as Native, the Google Developers Console provides me with a client secret. As far as I understand the OAuth 2.0 protocol, native apps should never have a client secret, since they cannot guarantee its secrecy. Is Google mistaken in its implementation of OAuth 2.0? How should I proceed? 回答1: You are correct, the client secret isn't terribly useful in a native

Azure AD B2C: User.Identity.Name is null, but User.Identity.m_instance_claims[9] has the name

女生的网名这么多〃 提交于 2021-02-04 19:40:08
问题 After a user is authenticated into my Azure AD B2C web application, I attempt to retrieve User.Identity.Name ; however, it is null. Yet, User.Identity.m_instance_claims[9] , as shown in the screenshot below, does correctly have the name. How can this be? How can I get User.Identity.Name = User.Identity.m_instance_claims[9] ? (Note that the latter is a private variable, and it cannot be used as a substitute for User.Identity.Name . UPDATE I have also added the following to the Web.config file: