Hi,
Env: Typescript + React + Okta + Create-React-App
Summary: Unable to display custom logo on Okta sign in widget. Followed below url
https://developer.okta.com/code/react/okta_react_sign-in_widget/ but no luck.
Below is the code in my OktaSignInWidget.tsx file.
import React, { Component } from ‘react’;
import ReactDOM from ‘react-dom’;
import OktaSignIn from ‘@okta/okta-signin-widget’;
import ‘@okta/okta-signin-widget/dist/css/okta-sign-in.min.css’;
interface IOktaSignInWidget {
baseUrl: any;
onSuccess: (res: any) => void;
onError: (err: any) => void;
}
export default class OktaSignInWidget extends Component {
widget: any;
componentDidMount() {
const el = ReactDOM.findDOMNode(this);
this.widget = new OktaSignIn({
baseUrl: this.props.baseUrl,
logo: ‘./assets/images/my-logo.jpg’,
authParams: {
pkce: true
}
});
this.widget.renderEl({el}, this.props.onSuccess, this.props.onError);
}
componentWillUnmount() {
this.widget.remove();
}
render() {
return <div />;
}
};
No error message.