I am currently working on integrating Xero into our application using Next.js for the client-side functionality. I have followed the documentation to add a Xero authentication script and button with the necessary classes here
Below is the code snippet:
import Head from 'next/head'
import Image from 'next/image'
import { Inter } from 'next/font/google'
const inter = Inter({ subsets: ['latin'] })
export default function Home() {
return (
<>
<Head>
<title>Create Next App</title>
<meta name="description" content="Generated by create next app" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="icon" href="/favicon.ico" />
<meta name="xero-client-id" content="clientID" />
<meta name="xero-scopes" content="openid,profile,email" />
<meta name="xero-redirect-uri" content="https://localhost:5001/Authorization/Callback" />
<script src='https://edge.xero.com/platform/sso/xero-sso.js' defer></script>
</Head>
<main >
<div >
<h1>Login page</h1>
<div>
<span data-xero-sso data-label="Sign In with Xero"></span>
</div>
</div>
</main>
</>
)
}
However, I encountered an error as shown in this screenshot: https://i.sstatic.net/wiHzu.png
I would appreciate any assistance in resolving this issue.