OAuth: how to test with local URLs?

Update October 2016: Easiest now: use lvh.me which always points to 127.0.0.1, but make sure to verify that this is still true every time you need to invoke it (because domains can expire or get taken over, and DNS poisoning is always a concern) Previous Answer: Since the callback request is issued by the browser, … Read more

Why do access tokens expire?

This is very much implementation specific, but the general idea is to allow providers to issue short term access tokens with long term refresh tokens. Why? Many providers support bearer tokens which are very weak security-wise. By making them short-lived and requiring refresh, they limit the time an attacker can abuse a stolen token. Large … Read more

Security of REST authentication schemes

A previous answer only mentioned SSL in the context of data transfer and didn’t actually cover authentication. You’re really asking about securely authenticating REST API clients. Unless you’re using TLS client authentication, SSL alone is NOT a viable authentication mechanism for a REST API. SSL without client authc only authenticates the server, which is irrelevant … Read more

What is an Endpoint?

Come on guys 🙂 We could do it simpler, by examples: /this-is-an-endpoint /another/endpoint /some/other/endpoint /login /accounts /cart/items and when put under a domain, it would look like: https://example.com/this-is-an-endpoint https://example.com/another/endpoint https://example.com/some/other/endpoint https://example.com/login https://example.com/accounts https://example.com/cart/items Can be either http or https, we use https in the example. Also endpoint can be different for different HTTP methods, for … Read more

What is the purpose of the implicit grant authorization type in OAuth 2?

Here are my thoughts: The purpose of auth code + token in authorization code flow is that token and client secret will never be exposed to resource owner because they travel server-to-server. On the other side, implicit grant flow is for clients that are implemented entirely using javascript and are running in resource owner’s browser. … Read more

OAuth 2.0: Benefits and use cases — why?

Background: I’ve written client and server stacks for OAuth 1.0a and 2.0. Both OAuth 1.0a & 2.0 support two-legged authentication, where a server is assured of a user’s identity, and three-legged authentication, where a server is assured by a content provider of the user’s identity. Three-legged authentication is where authorization requests and access tokens come … Read more

Facebook OAuth “The domain of this URL isn’t included in the app’s domain”

In case someone comes across this and is looking for these settings (like I was) You have to On the left hand side, click “+Add Product” and select “Facebook Login” (it was at the top for me) See the new settings available on the left hand side You will now have these OAuth settings on … Read more

Why is there an “Authorization Code” flow in OAuth2 when “Implicit” flow works so well?

tl;dr: This is all because of security reasons. OAuth 2.0 wanted to meet these two criteria: You want to allow developers to use non-HTTPS redirect URI because not all developers have an SSL enabled server and if they do it’s not always properly configured (non-self signed, trusted SSL certificates, synchronised server clock…). You don’t want … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)