I am trying to implement Firebase Email-Password Authentication using Kotlin in Web Front-End. But I think we can't do it using Kotlin as Firebase Authentication for Web only supports JS as per the examples I have seen.
So, my first question is: Can we implement it using Kotlin?
If not then, how can we call JS function from Kotlin within a Kotlin file and vice-versa?
Thanks in advance.
JavaScript and Kotlin can easily interoperate. Here I'll provide some excerpts from official documentation as well as links to that documentation.
Calling Kotlin code from JS
Calling JS code from Kotlin
I will add here that external function can be provided not necessarily by developer themselves - it can be something that already exist in this environment - like browser API.