diff --git a/OAuth2.md b/OAuth2.md index 5b18096..4b9c273 100644 --- a/OAuth2.md +++ b/OAuth2.md @@ -36,6 +36,9 @@ A way for the `user` to tell `google` to give an access token to `xorismesiti.gr 2. After this redirection, the user will log in to Google and grant permissions (if they haven’t already). 3. Google will redirect the user back to your specified redirect_uri with an authorization code. +
+

HTTP Request

+ ```sh GET https://accounts.google.com/o/oauth2/v2/auth? response_type=code& @@ -51,8 +54,10 @@ GET https://accounts.google.com/o/oauth2/v2/auth? - `scope`: The permissions you're requesting (e.g., email, profile). - `state`: A random string to protect against CSRF attacks. +
+
-

Example Frontent Code

+

Frontent Code

```js // Redirect to Google's OAuth 2.0 endpoint when user clicks login