-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
I'm having issues setting up this SDK. it returns this Cannot GET /https:/identity.dojah.io on a white page

Here is my setup
import React from "react";
import Dojah from "react-dojah";
const DojahComponent = () => {
const appID = process.env.NEXT_PUBLIC_DOJAH_APP_ID;
const publicKey = process.env.NEXT_PUBLIC_DOJAH_PUBLIC_KEY;
const type = process.env.NEXT_PUBLIC_DOJAH_LINK;
/**
* These are the configuration options
* available to you are:
* {debug: BOOL, pages: ARRAY[page: STRING, config: OBJECT]}
*
* The config object is as defined below
*
* NOTE: The
>
> OTP and selfie options are only
* Available to the `verification` widget
*/
const config = {
debug: true,
pages: [
{
page: "government-data",
config: {
bvn: true,
nin: false,
dl: false,
mobile: false,
otp: false,
selfie: false,
},
},
{ page: "selfie" },
{ page: "id", config: { passport: false, dl: true } },
],
};
/**
* These are the user's data to verify, options
* available to you possible options are:
* {first_name: STRING, last_name: STRING, dob: DATE STRING}
*
* NOTE: Passing all the values will automatically skip
* the user-data page (thus the commented out `last_name`)
*/
const userData = {
first_name: "Chijioke",
last_name: "", // 'Nna'
dob: "2022-05-01",
};
/**
* These are the metadata options
* You can pass any values within the object
*/
const metadata = {
user_id: "121",
};
const response = (type, data) => {
console.log(type, data);
if (type === "success") {
console.log("success");
} else if (type === "error") {
console.log("error");
} else if (type === "close") {
console.log("close");
} else if (type === "begin") {
console.log("begin");
} else if (type === "loading") {
console.log("loading");
}
};
// The Doja library accepts 3 props and
// initializes the doja widget and connect process
return (
<Dojah
response={response}
appID={appID}
publicKey={publicKey}
type={type}
config={config}
userData={userData}
metadata={metadata}
/>
);
};
export default DojahComponent;
Metadata
Metadata
Assignees
Labels
No labels