Get user info via Google API

Add this to the scope – https://www.googleapis.com/auth/userinfo.profile And after authorization is done, get the information from – https://www.googleapis.com/oauth2/v1/userinfo?alt=json It has loads of stuff – including name, public profile url, gender, photo etc.

Difference between OAuth 2.0 “state” and OpenID “nonce” parameter? Why state could not be reused?

State and nonce seem to be similar. But if you dig deep, you will find that they serve different purposes. State is there to protect the end user from cross site request forgery(CSRF) attacks. It is introduced from OAuth 2.0 protocol RFC6749. Protocol states that, Once authorization has been obtained from the end-user, the authorization … Read more

Facebook Access Token for Pages

Go to the Graph API Explorer Choose your app from the dropdown menu Click “Get Access Token” Choose the manage_pages permission (you may need the user_events permission too, not sure) Now access the me/accounts connection and copy your page’s access_token Click on your page’s id Add the page’s access_token to the GET fields Call the … Read more

Securing my REST API with OAuth while still allowing authentication via third party OAuth providers (using DotNetOpenAuth)

First I’d like to emphasize the difference between authentication and authorization: A user authenticates to your web site by supplying some credential such as a username+password. OpenID allows this to be displaced by having the user authenticate to another service, which then asserts the user’s identity to your web site on the user’s behalf. Your … Read more

What exactly is OAuth (Open Authorization)?

What exactly is OAuth (Open Authorization)? OAuth allows notifying a resource provider (e.g. Facebook) that the resource owner (e.g. you) grants permission to a third-party (e.g. a Facebook Application) access to their information (e.g. the list of your friends). If you read it stated plainly, I would understand your confusion. So let’s go with a … Read more

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