Skip to content

Commit 8aa78b1

Browse files
committed
Add oauth_callback's Error handling code
1 parent 16204b5 commit 8aa78b1

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

authServer.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,20 @@ app.get("/auth", (req, res, next) => {
7676

7777
app.get("/oauth_callback", (req, res, next) => {
7878

79+
if(req.query.reason == "token_expired") {
80+
res.json({
81+
Msg: "Token deleted successfully."
82+
})
83+
} else if (req.query.reason == "cancelled"){
84+
res.json({
85+
Msg: "Canceled."
86+
})
87+
} else if (req.query.reason == "token_expired") {
88+
res.json({
89+
Msg: "Token expired!"
90+
})
91+
}
92+
7993
var client = new Evernote.Client({
8094
consumerKey: accessToken.consumerKey,
8195
consumerSecret: accessToken.consumerSecret,

0 commit comments

Comments
 (0)