diff --git a/src/GoTrueClient.ts b/src/GoTrueClient.ts index 19b657bd..9ec0e9f3 100644 --- a/src/GoTrueClient.ts +++ b/src/GoTrueClient.ts @@ -332,7 +332,7 @@ export default class GoTrueClient { */ private async _initialize(): Promise { try { - const params = parseParametersFromURL(window.location.href) + const params = isBrowser() ? parseParametersFromURL(window.location.href) : {} let callbackUrlType = 'none' if (this._isImplicitGrantCallback(params)) { callbackUrlType = 'implicit'