SuperTokens.init throws exception for api base path
Closed this issue · 3 comments
trivialkettle commented
Hi
I initialize supertokens with
SuperTokens.init(
apiDomain: "http://localhost:8081",
apiBasePath: 'auth',
tokenTransferMethod: SuperTokensTokenTransferMethod.HEADER);
and catch the exception
SuperTokensException (Invalid protocol)
Callstack:
NormalisedURLPath.normaliseIRLPathOrThrowError (pub.dev/supertokens_flutter-0.2.7/lib/src/normalised-url-path.dart:15)
new NormalisedURLPath (pub.dev/supertokens_flutter-0.2.7/lib/src/normalised-url-path.dart:7)
new NormalisedInputType.normaliseInputType (pub.dev/supertokens_flutter-0.2.7/lib/src/utilities.dart:375)
SuperTokens.init (pub.dev/supertokens_flutter-0.2.7/lib/src/supertokens.dart:55)
main (<mymain>)
<asynchronous gap> (Unknown Source:0)
in factory NormalisedInputType.normaliseInputType() is the call
var _apiBasePath = NormalisedURLPath("/auth");
that throws in normaliseIRLPathOrThrowError
at:
try {
if (!trimmedInput.startsWith('http'))
throw SuperTokensException('Invalid protocol');
SDK: supertokens_flutter: ^0.2.4
nkshah2 commented
What platform are you running on?
trivialkettle commented
Hi @nkshah2
Linux
nkshah2 commented
Right, so the flutter SDK only works with ios and android at the moment