Unable to resolve host "discoveryUrl": No address associated with hostname

Hi

I’ve got an iOS app with the sdk.

I use the WebAuthentication to log in (webAuth.signIn), when successfully log in, then I store the token with Credential.store(token)

I’ve set up the current expiration times:

image

I’ve double checked that the Token object returned in the WebAuthentication (webAuth.signIn method) contains an expiration time of 360 seconds.

But if after one minute of being logged in if I try to refresh the token, and I call Credential.default, I will get null so I won’t be able to do credential.refreshIfNeeded

Am I doing something wrong?

Thanks


Update: I’ve found that if I do Credential.with(id: idForToken) it would work, but that means I would need to save the tokenId in a persistent way so I can get a Credentials object even if the user closes the app.

Is this the only way?

1 Like

Hello,

Have you run the sample Web Authentication sample,

Hi, Erik

Thanks for the answer

I’ve double checked the example is doing the same than me but I could not run it because it won’t compile, error:

Failed to build module 'PackageDescription' for importation due to the errors above; the textual interface may be broken by project issues or a compiler bug


Update I’ve managed to delete the package dependencies and add them again but I still get the error: No such module 'WebAuthenticationUI'

Maybe I don’t have experience with Swift Package manager ( I’m old fashion fan of Cocoa Pods :slight_smile: )