Last active
June 18, 2022 09:05
-
-
Save yathindrak/dd27dcdc4a9b66fb4a3e72c530cfc509 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { ReactNode } from "react"; | |
import { AuthProvider } from "@asgardeo/auth-react"; | |
import useSiteMetadata from "../hooks/useSiteMetaData"; | |
import "../styles/global.css"; | |
interface Props { | |
children?: ReactNode; | |
} | |
const PageLayout = ({ children }: Props) => { | |
const { title, description } = useSiteMetadata(); | |
return ( | |
<React.Fragment> | |
<html lang="en" /> | |
<title>{title}</title> | |
<meta name="description" content={description} /> | |
<AuthProvider | |
config={{ | |
signInRedirectURL: "https://localhost:8000", | |
signOutRedirectURL: "https://localhost:8000", | |
clientID: `${process.env.GATSBY_CLIENT_ID}`, | |
baseUrl: `https://api.asgardeo.io/t/${process.env.GATSBY_ORGANIZATION}`, | |
scope: ["openid", "profile"], | |
}} | |
> | |
{children} | |
</AuthProvider> | |
</React.Fragment> | |
); | |
}; | |
export default PageLayout; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment