SAML protocol for SPA

Can a SPA have both SP initiated flow and IDP initiated flow SSO via SAML using Okta ?