Lesson 8: OAuth

OAuth is an authentication protocol used for app (web or mobile) data access authorization. This method helps to make use of a third-party system such as Google, Facebook, or GitHub to gain access to the application. A common example is making use of your Google mail (Gmail) or Facebook account to register and log in to Glitch.com. So this protocol needs three parties in any OAuth mechanism: the client (the user), the consumer (eg: Glitch), and the service provider (eg: Google).

The OAuth uses the following steps:

1.    Within your application such as Glitch.com, a window appears allowing the user to login/register using an existing account with Facebook or Google Mail

2.    Once authenticated and authorized, the third-party app acknowledges the permission and redirects the user back to your app via a pre-configured URL.

  1. Your application exposes an endpoint for such callback operations and hits the third-party provider API to ask for an access token based on the response code returned by the previous redirect process.

This authentication protocol provides advantages such as:

·         It allows you to read data of a user from another application.

·         It supplies the authorization workflow for web, desktop applications, and mobile devices.

·         Is a server-side web app that uses authorization code and does not interact with user credentials.

Reference

https://www.honeybadger.io/blog/oauth-nodejs-javascript/

https://www.sohamkamani.com/nodejs/oauth/

Comments

Popular posts from this blog

W12 Paper: Parenting

2b Design: A creative social business in Lebanon

BUS 374 Social Innovation - Reflection: Final