{{! This DataSource just permanently listens to any changes to the users }}
{{! token, whether thats a new token, a changed token or a deleted token }}
{{! This DataSink is just used for logging in from the form, }}
{{! or logging out via the exposed logout function }}
{{yield}}
{{#let (hash
login=(action sink.open)
logout=(action sink.open null)
token=token
) (hash
AuthProfile=(component 'auth-profile' item=token)
AuthForm=(component 'auth-form' dc=dc nspace=nspace onsubmit=(action sink.open value="data"))
) as |api components|}}
{{#yield-slot name="authorized"}}
{{yield api components}}
{{/yield-slot}}
{{#yield-slot name="unauthorized"}}
{{yield api components}}
{{/yield-slot}}
{{/let}}