Skip to content

Commit

Permalink
lmendoza/fix-interstitial-oauth
Browse files Browse the repository at this point in the history
  • Loading branch information
leomendoza123 committed Feb 21, 2025
1 parent ba89a16 commit 321e842
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/app/authorize/pages/authorize/authorize.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,12 @@ export class AuthorizeComponent {
* based on user domain status, togglz, impersonation, etc.
*/
private canShowDomainInterstitial(): boolean {
console.log('hasPrivateDomains', this.hasPrivateDomains)
console.log('hasPublicDomains', this.hasPublicDomains)
console.log('isOAuthDomainsInterstitialEnabled', this.isOAuthDomainsInterstitialEnabled)
console.log('hasDomainInterstitialBeenViewed', this.hasDomainInterstitialBeenViewed)
console.log('isNotImpersonating', this.isNotImpersonating)
console.log('insidePopUpWindows', this.insidePopUpWindows)
return (
this.hasPrivateDomains &&
!this.hasPublicDomains &&
Expand Down Expand Up @@ -214,6 +220,8 @@ export class AuthorizeComponent {
first(),
tap((emails) => {
this.originalEmailsBackendCopy = cloneDeep(emails)
this.hasPrivateDomains = this.userHasPrivateEmails(emails)
this.hasPublicDomains = this.userHasPublicEmails(emails)
})
)
} else {
Expand Down Expand Up @@ -251,6 +259,7 @@ export class AuthorizeComponent {
}

// 2. If the user was already authorized, we might show domain interstitial or just redirect
console.log(this.isUserAlreadyAuthorized(this.oauthSession))
if (this.isUserAlreadyAuthorized(this.oauthSession)) {
if (this.canShowDomainInterstitial()) {
this.redirectByReportAlreadyAuthorize = true
Expand Down

0 comments on commit 321e842

Please sign in to comment.