It is very tricky to convert js library using the ...
# kobweb
a
It is very tricky to convert js library using the kotlin interop, like i was trying to integrate firebase otp authentication then i just created a js script of it and just call all those send otp, verify otp functions using kotlin externals. I found only this idea for now to quickly implement something😅
d
Yes that's a good option! Eventually I should write a guide about that. No pressure but do you have any code to share?
s
Have you checked this out @Anant Kumar Gupta? https://github.com/GitLiveApp/firebase-kotlin-sdk
a
@David Herman i will share that demo project
@Shubham Singh actually i tried this sdk before it is good and having most of the api as official firebase sdk but there is no api for authentication using phone otp.
s
Okay, even in that case, it should be easier for you to contribute to an existing library where you have all the reference code. Maybe consider contributing?
a
I would really like to contribute and later i will think about this but now i don't have time to port the firebase js library so i came up with this idea to write code in pure js and call those functions using kotlin externals
🆗 1
d
I'm just one open source developer so no idea how others feel -- I don't want to claim that I'm representing anyone besides myself here -- but I'm actually OK if people enjoy using my software without contributing to it. Dealing with incoming PRs, especially from first time devs, can actually be a significant time sink for a project -- often, PRs take longer to go through rounds of review than it would have been for the developer to just write the code themselves, and if they are working on other features at the time, these reviews can eat into time working on that. PRs can still be worth it if the person plans to contribute regularly in the future, of course, and sometimes a tired library author can appreciate leading someone else to write code that they aren't passionate about.... but for one-offs, a simple bug report / feature request / feedback can be just fine. Of course, if you ask an open source project to add a feature that they don't have time to prioritize and you're not willing to dig into it more yourself, then yeah, you probably shouldn't complain 🙂 But here, Anant ran into a wall and it sounds like they solved the problem with a quick local patch, and I think that's reasonable.
a
And yeah it is not limited to just a firebase or something, we can implement thousands of libraries using this method without porting them completely. Thanks @David Herman for this awesome framework specially for a person like me who hasn't worked much in a html, css and js things but still can build a full stack site. And later i am planning to contribute to port major libraries into kotlin/js.
🤝 1
Hey David, kindly check this project how i used firebase otp authentication https://github.com/devuloopers/kustomjs
thank you color 1