okta-react-native-web
v1.2.2
Published
Okta wrapper for react-native-web
Downloads
6
Maintainers
Readme
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