Just wanted to ask this here before I request supp...
# react
m
Just wanted to ask this here before I request support over at Auth0; hopefully I'm not just doing something wrong (using kotlin wrapping their sdk) because a lot of their documentation seems to imply this just works but my result is anything I pass in for "opts" ends up as "queryParam_1" (adding _1 to the end and ultimately not affecting any behavior whether it was supposed to generate a url or not): no matter what method I call; logout, loginWithRedirect, etc. I've ultimately defined the function as so
Copy code
external interface Auth0ContextInterface : AuthState {
  fun logout(options: Object? = definedExternally): Void
}
and I call it like so:
auth0.logout(object { val localOnly = true })
only it (unlike the documentation implies) adds localOnly_1 to the url and redirects me (whereas that option should not perform anything with urls) https://auth0.github.io/auth0-react/interfaces/Auth0ContextInterface.html#logout
Solution inside
t
jso
factory is preferred. Example
b
We'll it's the same end result. Jso just saves you the trouble if having to write those couple of lines yourself
t
It’s also strict DSL for now and potentially compiler checks in future
b
Strict dsl can be replicated with extra 2 limeas and compiler checks are unlikely as this is not part of stdlib. In short, I don't see any reason to bring in an entire dependency for a single function alone
t
and compiler checks are unlikely as this is not part of stdlib
I’m talking about custom compiler plugin 🙂
👍 1
m
Thank you so much; sorry for taking a while to get back! I got it working with the first comment though I'm always excited to try out better options! It's not just one function it's actually all of them perhaps so the library would be useful I just found a workaround for all the other functions not behaving until I couldn't find any option that worked because logout was the "only way" to actually clear the session locally in the sdk from what I could tell.