How to add a GitHub personal access token to Visual Studio Code

Follow these simple steps to set up GitHub authentication with a personal access token: Open a command line window on your PC or Terminal on Mac Set the current directory to your project root cd C:\Users\Giddy\source\repo\MySampleProject Run the command to set remote access via a token git remote set-url origin https://username:token@github.com/username/repository.git Example: git remote set-url … Read more

What is the difference between OAuth based and Token based authentication?

This is a good question — there is a lot of confusion around tokens and OAuth. First up, when you mention OAuth, you are likely referring to the OAuth2 standard. This is the latest version of the OAuth protocol, and is what most people are specifically talking about when they say ‘OAuth’. The OAuth protocol … Read more

Is a Refresh Token really necessary when using JWT token authentication?

Let me come to your questions a little later down the line and start by actually discussing the whole purpose of a refresh token. So the situation is: The user opens the app and provides his login credentials. Now, most probably the app is interacting with a REST backend service. REST is stateless, there isn’t … Read more

How to decode the JWT encoded token payload on client-side in angular?

I use Auth0’s jwt-decode package for decoding JWT token in Angular; this package works for me fine. After installing the package through this command: npm install jwt-decode Import this package into your TypeScript class using this syntax: import * as jwt_decode from “jwt-decode”; Or for newer versions (3 and above): import jwt_decode from ‘jwt-decode’; Then … Read more

Python request with authentication (access_token)

The requests package has a very nice API for HTTP requests, adding a custom header works like this (source: official docs): >>> import requests >>> response = requests.get( … ‘https://website.example/id’, headers={‘Authorization’: ‘access_token myToken’}) If you don’t want to use an external dependency, the same thing using urllib2 of the standard library looks like this (source: … 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

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