mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-13 11:50:56 +00:00
UBERF-8251: Fix github re-authenticate (#6704)
Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
parent
4ae95a447f
commit
33e132cb00
@ -24,10 +24,10 @@ export async function onAuthorize (login?: string): Promise<void> {
|
||||
)
|
||||
const client = getClient()
|
||||
|
||||
const config = await client.findOne(github.class.GithubAuthentication, {})
|
||||
|
||||
if (config !== undefined) {
|
||||
await client.remove(config)
|
||||
// Remove old authorizations.
|
||||
const config = await client.findAll(github.class.GithubAuthentication, {})
|
||||
for (const c of config) {
|
||||
await client.remove(c)
|
||||
}
|
||||
await client.createDoc<GithubAuthentication>(github.class.GithubAuthentication, core.space.Workspace, {
|
||||
attachedTo: meId,
|
||||
|
Loading…
Reference in New Issue
Block a user