File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -132,33 +132,13 @@ export class CalComOAuthService {
132132 }
133133
134134 return { type : "error" } ;
135- }
136-
137- if ( Platform . OS === "web" ) {
138- const discovery = await this . getDiscoveryEndpoints ( ) ;
139- const request = new AuthSession . AuthRequest ( {
140- clientId : this . config . clientId ,
141- redirectUri : this . config . redirectUri ,
142- responseType : AuthSession . ResponseType . Code ,
143- state,
144- codeChallenge,
145- codeChallengeMethod : AuthSession . CodeChallengeMethod . S256 ,
146- } ) ;
147-
148- const result = await request . promptAsync ( discovery ) ;
149-
150- if ( result . type === "success" ) {
151- return { type : "success" , params : result . params ?? { } } ;
135+ } else {
136+ try {
137+ const responseUrl = await this . launchExtensionAuthFlow ( authUrl ) ;
138+ return { type : "success" , params : this . parseCallbackUrl ( responseUrl ) } ;
139+ } catch {
140+ return { type : "error" } ;
152141 }
153-
154- return { type : "error" } ;
155- }
156-
157- try {
158- const responseUrl = await this . launchExtensionAuthFlow ( authUrl ) ;
159- return { type : "success" , params : this . parseCallbackUrl ( responseUrl ) } ;
160- } catch {
161- return { type : "error" } ;
162142 }
163143 }
164144
You can’t perform that action at this time.
0 commit comments