mirror of
https://github.com/JuLi0n21/osu-progress-oauth-helper.git
synced 2026-04-19 16:00:06 +00:00
refresh to readme send back error
This commit is contained in:
@@ -20,4 +20,11 @@ https://example.vercel.app/authorize?port=4200
|
|||||||
https://localhost:4200/{CALLBACK_URL}?access_token={access_token}&refresh_token={refresh_token}&expires_in={expires_in}
|
https://localhost:4200/{CALLBACK_URL}?access_token={access_token}&refresh_token={refresh_token}&expires_in={expires_in}
|
||||||
7. profit?
|
7. profit?
|
||||||
|
|
||||||
|
To resfresh the token request this
|
||||||
|
POST:
|
||||||
|
https://example.vercel.app/refresh?port=4200
|
||||||
|
body: refresh_token : {refreshtoken}
|
||||||
|
|
||||||
|
new token should be send like in 6
|
||||||
|
|
||||||
## use at own risk, security holes might be in there
|
## use at own risk, security holes might be in there
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ app.get('/refresh', (req, res) => {
|
|||||||
console.log(data)
|
console.log(data)
|
||||||
res.redirect(`http://localhost:${callbackport}/${process.env.CALLBACK_URL}?access_token=${data.access_token}&refresh_token=${data.refresh_token}&expires_in=${data.expires_in}`);
|
res.redirect(`http://localhost:${callbackport}/${process.env.CALLBACK_URL}?access_token=${data.access_token}&refresh_token=${data.refresh_token}&expires_in=${data.expires_in}`);
|
||||||
})
|
})
|
||||||
.catch(error => console.error('Error:', error));
|
.catch(error => res.json(error));
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
|
|||||||
Reference in New Issue
Block a user