@adityasinghal26/daytona-web
v0.1.1
Published
_This package was created through the Backstage CLI_.
Downloads
4
Maintainers
Readme
@adityasinghal26/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:
# From your Backstage root directory
yarn --cwd packages/app add @adityasinghal26/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 inapis.ts
file.// In packages/app/src/apis.ts import { daytonaApiFactory } from '@adityasinghal26/daytona-web'; // Add the Daytona ApiFactory to the list of available APIs export const apis: AnyApiFactory[] = [ {/* other ApiFactory here */} daytonaApiFactory ];
Add the following to Backstage
App.tsx
file.// In packages/app/src/App.tsx import { daytonaSignInProvider } from '@adityasinghal26/daytona-web'; // Add the Daytona Sign-In Provider to the available sign-in providers const app = createApp({ {/* other api, bind routes here */} components: { SignInPage: props => <SignInPage {...props} auto providers={['guest',daytonaSignInProvider]} />, }, });