mirror of
https://github.com/bitwarden/browser
synced 2025-12-20 18:23:31 +00:00
Sso link existing user (#616)
* created and applied link-sso component * implemented linking existing user to sso * removed an unused import * created and applied link-sso component * implemented linking existing user to sso * removed an unused import * merge * added a token to the sso linking flow * [jslib] Update (5d874d0->6ab444a) (#618) * Update jslib (5d874d0->6ab444a) * Update dependency flows * created and applied link-sso component * implemented linking existing user to sso * removed an unused import * merge * added a token to the sso linking flow * implemented linking existing user to sso * removed an unused import * account for some variable shakeup in jslib for link sso * updated jslib * updated jslib * still trying to fix jslib * finally, really, truly updated jslib Co-authored-by: Vincent Salucci <26154748+vincentsalucci@users.noreply.github.com>
This commit is contained in:
48
src/app/settings/link-sso.component.ts
Normal file
48
src/app/settings/link-sso.component.ts
Normal file
@@ -0,0 +1,48 @@
|
||||
import {
|
||||
AfterContentInit,
|
||||
Component,
|
||||
Input,
|
||||
} from '@angular/core';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
|
||||
import { ApiService } from 'jslib/abstractions/api.service';
|
||||
import { AuthService } from 'jslib/abstractions/auth.service';
|
||||
import { CryptoFunctionService } from 'jslib/abstractions/cryptoFunction.service';
|
||||
import { I18nService } from 'jslib/abstractions/i18n.service';
|
||||
import { PasswordGenerationService } from 'jslib/abstractions/passwordGeneration.service';
|
||||
import { PlatformUtilsService } from 'jslib/abstractions/platformUtils.service';
|
||||
import { StateService } from 'jslib/abstractions/state.service';
|
||||
import { StorageService } from 'jslib/abstractions/storage.service';
|
||||
|
||||
import { SsoComponent } from 'jslib/angular/components/sso.component';
|
||||
|
||||
import { Organization } from 'jslib/models/domain/organization';
|
||||
|
||||
@Component({
|
||||
selector: 'app-link-sso',
|
||||
templateUrl: 'link-sso.component.html',
|
||||
})
|
||||
export class LinkSsoComponent extends SsoComponent implements AfterContentInit {
|
||||
@Input() organization: Organization;
|
||||
returnUri: string = '/settings/organizations'
|
||||
|
||||
constructor(platformUtilsService: PlatformUtilsService, i18nService: I18nService,
|
||||
apiService: ApiService, authService: AuthService,
|
||||
router: Router, route: ActivatedRoute,
|
||||
cryptoFunctionService: CryptoFunctionService, passwordGenerationService: PasswordGenerationService,
|
||||
storageService: StorageService, stateService: StateService) {
|
||||
super(authService, router,
|
||||
i18nService, route,
|
||||
storageService, stateService,
|
||||
platformUtilsService, apiService,
|
||||
cryptoFunctionService, passwordGenerationService);
|
||||
|
||||
this.returnUri = '/settings/organizations';
|
||||
this.redirectUri = window.location.origin + '/sso-connector.html';
|
||||
this.clientId = 'web';
|
||||
}
|
||||
|
||||
async ngAfterContentInit() {
|
||||
this.identifier = this.organization.identifier;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user