We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent df0bc36 commit 44db431Copy full SHA for 44db431
1 file changed
src/provider.tsx
@@ -217,6 +217,20 @@ const CriiptoVerifyProvider = (props: CriiptoVerifyProviderOptions): React.React
217
const configuration = await client.fetchOpenIDConfiguration();
218
if (isSubscribed) setConfiguration(configuration);
219
})();
220
+ (async () => {
221
+ try {
222
+ // This tries to verify that the domain and client id are correct
223
+ await client.fetchCriiptoConfiguration();
224
+ } catch (error) {
225
+ if (isSubscribed) {
226
+ setResult(() => {
227
+ // Throwing directly from the async function does nothing. But using a setState action
228
+ // injects the error into the react render loop.
229
+ throw error;
230
+ });
231
+ }
232
233
+ })();
234
235
return () => {
236
isSubscribed = false;
0 commit comments