Skip to content
This repository was archived by the owner on Jan 4, 2025. It is now read-only.

Commit 70e724c

Browse files
committed
Add readme
1 parent 9c7ca2e commit 70e724c

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Simple OAuth Auth Code
2+
3+
This modules provides a REST resource to get an OAuth authorization code for login by integrating with the [Simple OAuth](https://www.drupal.org/project/simple_oauth) and the [Verification API](https://www.drupal.org/project/verification) modules.
4+
5+
## Introduction
6+
7+
In some scenarious we want to login the user without the user actively providing the login credentials. E.g. when clicking a password reset link.
8+
9+
To accomplish this, this module provides a REST resource to request a OAuth authorization code, which can later be exchanged for an access token.
10+
11+
A authorization code can only be requested, if the request is verified via the Verification API (e.g. a verification code that has been sent to the user's e-mail account).
12+
13+
If the verification was successful, a authorization code is being generated for the given user.
14+
15+
Fore more information have a look at the [Verification API docs](https://github.com/wunderwerkio/drupal-verification).
16+
17+
## Setup
18+
19+
This module requires a configured [Consumer / Client](https://www.drupal.org/project/consumers) with the `Authorization Code Grant` enabled (the authorization code settings do not matter).
20+
21+
Do not forget to enable the REST resource and to set the correct permissions.
22+
23+
**Grant the REST resource permission to anonymous users, otherwise login will not work!**
24+
25+
## Example
26+
27+
The module only handles the generation of the auth code and requires additional modules to setup a complete workflow of handling e.g. passwordless login or a password reset.

0 commit comments

Comments
 (0)