Using Okta signin widget with pkce and plain javascript

Hello,

I am trying to add okta authentication to my plain javascript application. Our company policy requires us to use pkce. Implicit grant type is also prohibited. So, is it possible to do this using plain javascript? I did not find any examples of doing this in javascript. Please let me know.

Thanks,
Saura