schibsted / account-sdk-browser

Schibsted Account SDK for browsers
https://schibsted.github.io/account-sdk-browser/
MIT License
16 stars 11 forks source link

LoginOptions.state are different for Login and showSimplifiedLoginWidget, but are typed the same #207

Closed ole-martin closed 2 years ago

ole-martin commented 2 years ago

showSimplifiedLoginWidget "loginOptions" parameter is allowed to have state as a function, but the type does not allow this. I'm assuming that is due to sharing loginOptions-type with the regular Login-function, where state is only allowed to be a string. The javadoc is "saying" that it is allowed, but the type doesn't allow it. image

Can we get this fixed? To reproduce: Try calling the function with state as a function: image You will get image

ole-martin commented 2 years ago

Resolved by https://github.com/schibsted/account-sdk-browser/pull/208