Oauth 2.0 authorization for LinkedIn in Android

Oauth2.0 authentication for LinkedIN. Step 1: Register your app with linkedIn by following this document. And get your api_key and api_secret. Step 2: MainActivity: public class MainActivity extends Activity { /*CONSTANT FOR THE AUTHORIZATION PROCESS*/ /****FILL THIS WITH YOUR INFORMATION*********/ //This is the public api key of our application private static final String API_KEY = … Read more

Sending the bearer token with axios

const config = { headers: { Authorization: `Bearer ${token}` } }; const bodyParameters = { key: “value” }; Axios.post( ‘http://localhost:8000/api/v1/get_token_payloads’, bodyParameters, config ).then(console.log).catch(console.log); The first parameter is the URL. The second is the JSON body that will be sent along your request. The third parameter are the headers (among other things). Which is JSON as … Read more

facebook Uncaught OAuthException: An active access token must be used to query information about the current user

Just check for the current Facebook user id $user and if it returned null then you need to reauthorize the user (or use the custom $_SESSION user id value – not recommended) require ‘facebook/src/facebook.php’; // Create our Application instance (replace this with your appId and secret). $facebook = new Facebook(array( ‘appId’ => ‘APP_ID’, ‘secret’ => … Read more

What is the purpose of a “Refresh Token”?

Basically, refresh tokens are used to get new access token. To clearly differentiate these two tokens and avoid getting mixed up, here are their functions given in The OAuth 2.0 Authorization Framework: Access tokens are issued to third-party clients by an authorization server with the approval of the resource owner. The client uses the access … Read more

Where to store my Git personal access token?

Half the point of passwords is that (ideally) you memorize them and the system hashes them, so therefore they’re never stored anywhere in plain text. Yet GitHub’s personal access token system seems to basically force you to store the token in plain text? First, a PAT (Personal Access Token) is not a simple password, but … Read more