1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-11-23 08:47:42 -05:00
forgejo/services/auth/source/oauth2
zeripath 72738f0cb5
Lock goth/gothic and Re-attempt OAuth2 registration on login if registration failed at startup (#16564)
This PR has two parts:

* Add locking to goth and gothic calls with a RWMutex

The goth and gothic calls are currently unlocked and thus are a cause of multiple potential races

* Reattempt OAuth2 registration on login if registration failed

If OAuth2 registration fails at startup we currently disable the login_source however an alternative approach could be to reattempt registration on login attempt.
    
Fix #16096

Signed-off-by: Andrew Thornton <art27@cantab.net>
2021-07-29 18:53:18 +01:00
..
assert_interface_test.go Refactor: Move login out of models (#16199) 2021-07-24 11:16:34 +01:00
init.go Lock goth/gothic and Re-attempt OAuth2 registration on login if registration failed at startup (#16564) 2021-07-29 18:53:18 +01:00
jwtsigningkey.go switch to maintained lib (#16532) 2021-07-24 13:00:41 +02:00
providers.go Lock goth/gothic and Re-attempt OAuth2 registration on login if registration failed at startup (#16564) 2021-07-29 18:53:18 +01:00
source.go Add an abstract json layout to make it's easier to change json library (#16528) 2021-07-24 18:03:58 +02:00
source_authenticate.go Refactor: Move login out of models (#16199) 2021-07-24 11:16:34 +01:00
source_callout.go Lock goth/gothic and Re-attempt OAuth2 registration on login if registration failed at startup (#16564) 2021-07-29 18:53:18 +01:00
source_register.go Refactor: Move login out of models (#16199) 2021-07-24 11:16:34 +01:00
token.go switch to maintained lib (#16532) 2021-07-24 13:00:41 +02:00
urlmapping.go Refactor: Move login out of models (#16199) 2021-07-24 11:16:34 +01:00