Skip to content

Commit 570e6e6

Browse files
committed
throw oauth2 is not supported.
1 parent 7c14f9e commit 570e6e6

File tree

1 file changed

+1
-31
lines changed

1 file changed

+1
-31
lines changed

src/services/account.ts

Lines changed: 1 addition & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -706,37 +706,7 @@ export class Account extends Service {
706706
* @returns {void|string}
707707
*/
708708
createOAuth2Session(provider: string, success?: string, failure?: string, scopes?: string[]): void | URL {
709-
if (typeof provider === 'undefined') {
710-
throw new AppwriteException('Missing required parameter: "provider"');
711-
}
712-
713-
const apiPath = '/account/sessions/oauth2/{provider}'.replace('{provider}', provider);
714-
const payload: Payload = {};
715-
716-
if (typeof success !== 'undefined') {
717-
payload['success'] = success;
718-
}
719-
720-
if (typeof failure !== 'undefined') {
721-
payload['failure'] = failure;
722-
}
723-
724-
if (typeof scopes !== 'undefined') {
725-
payload['scopes'] = scopes;
726-
}
727-
728-
const uri = new URL(this.client.config.endpoint + apiPath);
729-
payload['project'] = this.client.config.project;
730-
731-
732-
for (const [key, value] of Object.entries(Service.flatten(payload))) {
733-
uri.searchParams.append(key, value);
734-
}
735-
if (typeof window !== 'undefined' && window?.location) {
736-
window.location.href = uri.toString();
737-
} else {
738-
return uri;
739-
}
709+
throw new AppwriteException('Not yet supported');
740710
}
741711

742712
/**

0 commit comments

Comments
 (0)