socialnetworknews-api

git clone git://archive.git.mtrnord.blog/SocialNetworkNews/socialnetworknews-api.git
Log | Files | Refs | LICENSE

commit f28d3fdcec60ad06da2df958a02964e5562b96a3
parent f6fb540600c8b11eb7121650def6de6b6f7f3723
Author: MTRNord <mtrnord1@gmail.com>
Date:   Sat, 31 Mar 2018 21:49:19 +0200

Return error if token generating failed

Diffstat:
Mapi/login/twitter.go | 4++++
1 file changed, 4 insertions(+), 0 deletions(-)

diff --git a/api/login/twitter.go b/api/login/twitter.go @@ -143,6 +143,10 @@ func IssueSession() http.Handler { // Sign and get the complete encoded token as a string using the secret tokenString, err := token.SignedString(secret) + if err != nil { + http.Error(w, err.Error(), http.StatusInternalServerError) + return + } // 2. Implement a success handler to issue some form of session session := sessionStore.New(sessionName)