LogoLogo
  • Welcome to OneAuxilia Docx
  • UI Component
    • Overview
    • <OneAuxiliaProvider>
    • Authentication Components
      • <SignIn />
      • <SignUp />
      • <GoogleOneTap />
    • User Components
      • <UserButton />
      • <UserProfile />
    • Organization Components
      • <CreateOrganization />
      • <OrganizationProfile />
      • <OrganizationSwitcher />
      • <OrganizationList />
    • Control Components
      • <AuthenticateWithRedirectCallback />
      • <OneAuxiliaLoaded>
      • <OneAuxiliaLoading>
      • <Protect>
      • <MultisessionAppSupport>
      • <RedirectToSignIn />
      • <RedirectToSignUp />
      • <RedirectToUserProfile />
      • <RedirectToOrganizationProfile />
      • <RedirectToCreateOrganization />
      • <SignedIn>
      • <SignedOut>
    • Unstyled Components
      • <SignInButton>
      • <SignInWithMetamaskButton>
      • <SignUpButton>
      • <SignOutButton>
  • Quick Start
  • Users
    • Overview
    • Metadata
    • Delete User
  • Organization
    • Organization, Role and Permission
      • Overview
      • Role and Permission
      • Guides
        • Create Role and assign Permission
        • Verify the active user's permission
        • Reassign the Creator role
      • Building custom flow
    • Multi Tenant Setting
  • Application
    • Application
    • User Portal
  • Authentication
    • Setting
    • Social Connectors
    • Multi Factor
  • Customize
    • Branding
    • Sign Up vs Sign In
      • Overview
      • Configuration
        • Sign-up and Sign-in options
        • Session Option
        • Email and SMS templates
      • Social Connection
        • Overview
        • Social connections (OAuth)
        • Account Linking
        • Setup Social Account Linking
  • Development
    • API Key
    • Local Path
    • Custom JWT templates
    • Domain
    • Webhook
    • Backend Request
      • Overview
      • Making requests
        • Same-origin requests
        • Cross-origin requests
        • Customize your session token
      • Handling requests
        • Manual JWT verification
      • Session Management
  • SDK References
    • React
      • Overview
      • Guides
        • Add React Router
      • Client-side Helpers
        • useUser()
        • useOneAuxilia()
        • useAuth()
        • useSignIn()
        • useSignUp()
        • useSession()
        • useSessionList()
        • useOrganization()
        • useOrganizationList()
  • API References
    • Open API
  • industry reference
    • Ecommerce
    • Broadcasting
    • IoT
Powered by GitBook
On this page
  1. UI Component
  2. Control Components

<RedirectToOrganizationProfile />

The <RedirectToOrganizationProfile /> component will navigate to the organization profile URL which has been configured in your application instance. The behavior will be just like a server-side (3xx) redirect, and will override the current location in the history stack.

Usage

pages/_app.tsx
import { OneAuxiliaProvider, SignedIn, SignedOut, RedirectToOrganizationProfile } from '@oneauxilia/nextjs'
import { AppProps } from 'next/app'

function MyApp({ Component, pageProps }: AppProps) {
  return (
    <OneAuxiliaProvider {...pageProps}>
      <SignedIn>
        <RedirectToOrganizationProfile />
      </SignedIn>
      <SignedOut>Sign In</SignedOut>
    </OneAuxiliaProvider>
  )
}

export default MyApp
pages/privatepage.tsx
import {
  OneAuxiliaProvider,
  SignedIn,
  SignedOut,
  RedirectToOrganizationProfile,
} from '@oneauxilia/oneauxilia-react'

function PrivatePage() {
  return (
    <OneAuxiliaProvider publishableKey={`YOUR_PUBLISHABLE_KEY`}>
      <SignedIn>
        <RedirectToOrganizationProfile />
      </SignedIn>
      <SignedOut>Sign In</SignedOut>
    </OneAuxiliaProvider>
  )
}
routes/index.tsx
import { SignedIn, SignedOut, RedirectToOrganizationProfile } from '@oneauxilia/remix'

export default function Index() {
  return (
    <div>
      <SignedIn>
        <RedirectToOrganizationProfile />
      </SignedIn>
      <SignedOut>
        <p>Sign in </p>
      </SignedOut>
    </div>
  )
}
Previous<RedirectToUserProfile />Next<RedirectToCreateOrganization />

Last updated 6 months ago