@@ -277,9 +277,15 @@ func RegisterRoutes(m *web.Route) {
277277 m .Get ("/{provider}" , auth .SignInOAuth )
278278 m .Get ("/{provider}/callback" , auth .SignInOAuthCallback )
279279 })
280- m .Get ("/link_account" , auth .LinkAccount )
281- m .Post ("/link_account_signin" , bindIgnErr (forms.SignInForm {}), auth .LinkAccountPostSignIn )
282- m .Post ("/link_account_signup" , bindIgnErr (forms.RegisterForm {}), auth .LinkAccountPostRegister )
280+ m .Group ("/link_account" , func () {
281+ m .Get ("" , auth .LinkAccount )
282+ }, openIDSignInEnabled )
283+ m .Group ("/link_account_signin" , func () {
284+ m .Post ("" , bindIgnErr (forms.SignInForm {}), auth .LinkAccountPostSignIn )
285+ }, openIDSignInEnabled )
286+ m .Group ("/link_account_signup" , func () {
287+ m .Post ("" , bindIgnErr (forms.RegisterForm {}), auth .LinkAccountPostRegister )
288+ }, openIDSignUpEnabled )
283289 m .Group ("/two_factor" , func () {
284290 m .Get ("" , auth .TwoFactor )
285291 m .Post ("" , bindIgnErr (forms.TwoFactorAuthForm {}), auth .TwoFactorPost )
@@ -342,7 +348,9 @@ func RegisterRoutes(m *web.Route) {
342348 m .Post ("/delete" , security .DeleteOpenID )
343349 m .Post ("/toggle_visibility" , security .ToggleOpenIDVisibility )
344350 }, openIDSignInEnabled )
345- m .Post ("/account_link" , security .DeleteAccountLink )
351+ m .Group ("/account_link" , func () {
352+ m .Post ("" , security .DeleteAccountLink )
353+ }, openIDSignInEnabled )
346354 })
347355 m .Group ("/applications/oauth2" , func () {
348356 m .Get ("/{id}" , user_setting .OAuth2ApplicationShow )
0 commit comments