Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
componentDidMount() {
this.widget = new OktaSignIn({
baseUrl: `${process.env.OTKA_BASE_URL}`,
logo: `${process.env.OTKA_LOGO}`,
redirectUri: window.location.origin,
authParams: {
issuer: 'default',
responseType: ['id_token', 'token'],
display: 'page',
},
features: {
registration: false, // Enable self-service registration flow
rememberMe: true, // Setting to false will remove the checkbox to save username
selfServiceUnlock: false,
},
clientId: `${process.env.OTKA_CLIENT_ID}`,
// Return an access token from the authorization server
getAccessToken: true,
componentDidMount() {
const el = ReactDOM.findDOMNode(this);
this.widget = new OktaSignIn({
baseUrl: this.props.baseUrl
});
this.widget.renderEl({el}, this.props.onSuccess, this.props.onError);
}
constructor(){
super();
this.state = { user: null };
this.widget = new OktaSignIn({
baseUrl: 'https://{OKTA ORG}.oktapreview.com',
clientId: '{Client ID}',
redirectUri: 'http://localhost:3000'
});
this.showLogin = this.showLogin.bind(this);
this.logout = this.logout.bind(this);
}