Open chrysn opened 2 days ago
I am not sure I fully understand this. the OAuth2
component injects the context holding the state. That's accessible by all children of this component.
AIU this is not about the context injected, but about how the data that comes in through the yew-nested-router feature is sent to one or the other OAuth instance. (The only relevant children I have in there are the usual Authenticated / NotAuthenticated / Failure children).
In a setup with parallel possible logins, once in a while (my guess: if the hashmap backing them happens to sort them in the wrong way), attempting to log in in one of two configured OAuth2 providers results in an error message at the other one (with "Server returned error response", which is not surprising given they got somehow mixed up).
The setup involves a field in the model
and a loop in the view:
For the moment I work around this by enabling them only on demand; I plan on digging down to this later. (Right now the usefulness of having multiple providers is limited; [edit] once https://github.com/ctron/yew-oauth2/issues/42 is added, this should be different.)