1.2.2 • Published 3 months ago

okta-react-native-web v1.2.2

Weekly downloads
-
License
MIT
Repository
github
Last release
3 months ago

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


1.2.2

3 months ago

1.2.0

3 months ago

1.2.1

3 months ago

1.3.0

3 months ago

1.1.1

4 months ago

1.1.0

4 months ago