Created
August 2, 2020 12:04
-
-
Save anishsujanani/7d719ac9c1c861446ea5aeaf1b0b6c33 to your computer and use it in GitHub Desktop.
Custom Oauth Client AuthME
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| app.post('/authme', (req, res) => { | |
| var state = crypto.randomBytes(10).toString('hex'); | |
| params = `?response_type=code&client_id=${client_id}&scope=${req.body.selected_scope}&state=${state}&redirect_uri=${redirect_uri}`; | |
| state_cache.push(state); | |
| res.redirect( auth_server_authorize_endpoint + params ); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment