You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/01/15 03:25:56 UTC

[GitHub] [apisix] spacewander commented on a change in pull request #6103: chore: streamline error checking process

spacewander commented on a change in pull request #6103:
URL: https://github.com/apache/apisix/pull/6103#discussion_r785262618



##########
File path: apisix/plugins/openid-connect.lua
##########
@@ -293,30 +293,28 @@ function _M.rewrite(plugin_conf, ctx)
         -- the configured redirect URI after successful authentication.
         response, err = openidc.authenticate(conf)
 
-        if err then
+        if not response then

Review comment:
       the openidc returns non-nil err to indicate something wrong, see:
   https://github.com/zmartzone/lua-resty-openidc#sample-configuration-for-google-signin
   https://github.com/zmartzone/lua-resty-openidc/blob/master/lib/resty/openidc.lua#L1494




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org