okta-react-native-web
TypeScript icon, indicating that this package has built-in type declarations

1.2.2 • Public • Published

NPM Version NPM Type Definitions

okta-react-native-web

Okta wrapper for react native web based on okta-auth-js sdk.

Installation

npm install okta-react-native-web

Usage

import { OktaProvider } from 'okta-react-native-web';

// ...

const authClient = new OktaAuth({
  issuer: 'https://{yourOktaDomain}/oauth2/default',
  clientId: 'YOUR_CLIENT_ID_GOES_HERE',
  redirectUri: 'YOUR_REDIRECT_URI_GOES_HERE',
});

const App = () => {
  return (
    <OktaProvider config={authClient}>
      <Home />
    </OktaProvider>
  );
};

In your protected routes use HOC to connect to OktaProvider

import { withOkta } from 'okta-react-native-web';

// ...

const Home = () => {
  //...
};

export default withOkta(Home);

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT


Package Sidebar

Install

npm i okta-react-native-web

Weekly Downloads

0

Version

1.2.2

License

MIT

Unpacked Size

58.6 kB

Total Files

55

Last publish

Collaborators

  • rishabhsehgal