mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Integrate OAuth2 Provider (#5378)
This commit is contained in:
committed by
techknowlogick
parent
9d3732dfd5
commit
e777c6bdc6
@@ -74,4 +74,12 @@ func loadApplicationsData(ctx *context.Context) {
|
||||
return
|
||||
}
|
||||
ctx.Data["Tokens"] = tokens
|
||||
ctx.Data["EnableOAuth2"] = setting.OAuth2.Enable
|
||||
if setting.OAuth2.Enable {
|
||||
ctx.Data["Applications"], err = models.GetOAuth2ApplicationsByUserID(ctx.User.ID)
|
||||
if err != nil {
|
||||
ctx.ServerError("GetOAuth2ApplicationsByUserID", err)
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user