authorizerdev / authorizer

Your data, your control. Fully open source, authentication and authorization. No lock-ins. Deployment in Railway in 120 seconds || Spin a docker image as a micro-service in your infra. Built in login page and Admin panel out of the box.
https://authorizer.dev
MIT License
1.61k stars 165 forks source link

Fix/apple login #414

Closed lakhansamani closed 1 year ago

lakhansamani commented 1 year ago

What does this PR do?

Fix apple login nil pointer exception

Which issue(s) does this PR fix?


2023/11/03 05:49:37 [Recovery] 2023/11/03 - 05:49:37 panic recovered:
runtime error: invalid memory address or nil pointer dereference
/usr/local/go/src/runtime/panic.go:261 (0x61c6b)
/usr/local/go/src/runtime/signal_unix.go:861 (0x61c38)
/authorizer/server/handlers/oauth_callback.go:591 (0x13cd334)
/authorizer/server/handlers/oauth_callback.go:72 (0x13d3b53)
/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/context.go:174 (0x109df7b)
/authorizer/server/middlewares/cors.go:25 (0x13cfec3)
/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/context.go:174 (0x109df7b)
/authorizer/server/middlewares/context.go:14 (0x13cfd3b)
/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/context.go:174 (0x10a93cf)
/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/recovery.go:102 (0x10a93b4)
/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/context.go:174 (0x13cecff)
/authorizer/server/middlewares/log.go:37 (0x13cece0)
/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/context.go:174 (0x10a8383)
/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/gin.go:620 (0x10a80ac)
/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/gin.go:576 (0x10a7ccf)
/usr/local/go/src/net/http/server.go:2938 (0x2eb20b)
/usr/local/go/src/net/http/server.go:2009 (0x2e7607)
/usr/local/go/src/runtime/asm_arm64.s:1197 (0x7e213)

If this PR affects any API reference documentation, please share the updated endpoint references