@daytonaio/daytona-web
This package was created through the Backstage CLI.
Description
The plugin provides the frontend components required for Daytona Authentication (daytonaApiFactory) and Sign-In (daytonaSignInProvider). These components will ease the implementation for Daytona authentication using OAuth in Backstage.
Installation
Install the package via Yarn in your Backstage root directory:
yarn --cwd packages/app add @daytonaio/daytona-web
Authentication Setup
Backstage requires ApiFactory to interact with Daytona OAuth library and a sign-in provider. Follow the below steps:
-
In Backstage folder packages/app/src, add the below snippet in apis.ts file.
import { daytonaApiFactory } from '@daytonaio/daytona-web';
export const apis: AnyApiFactory[] = [
{}
daytonaApiFactory
];
-
Add the following to Backstage App.tsx file.
import { daytonaSignInProvider } from '@daytonaio/daytona-web';
const app = createApp({
{}
components: {
SignInPage: props => <SignInPage {...props} auto providers={['guest',daytonaSignInProvider]} />,
},
});