Guys, thatns you for response,

It really helped me a lot, and I let myself play a little with:
https://github.com/mozilla/fxa-oauth-server
https://github.com/mozilla/fxa-auth-server

But, unfortunately it is not quite what I need

My context is next:
1) There is no client UI at all
2) I have Firefox Account credentials stored in the backend
3) Backend written via NodeJS

The flow is next:
1) Something  call backend server;
2) fxa-auth-server endpoint
https://github.com/mozilla/fxa-auth-server/blob/master/docs/api.md#post-v1accountlogin
called,
which returns session token
3) Hawk credentials is derived from session token received in step 2)

What I can do using Hawk credentials from step 3):
4a) Call
https://github.com/mozilla/fxa-auth-server/blob/master/docs/api.md#get-v1sessionstatus
to
get session status
5b) Call
https://github.com/mozilla/fxa-auth-server/blob/master/docs/api.md#post-v1sessiondestroy
to
destroy session

What I want be able to do using Hawk credentials from step 3)
4b) Call https://docs.services.mozilla.com/loop/apis.html#post-call-url to
get call url
But the only thing I receive from Loop Server:
{
"code": 401,
"errno": 110,
"error": {
"statusCode": 401,
"error": "Unauthorized",
"message": "Unknown credentials"
}
}

So I here are more concrete questions:
- is it even possible to call
https://docs.services.mozilla.com/loop/apis.html#post-call-url with hawk
credentials derived from session token recieved from
https://github.com/mozilla/fxa-auth-server/blob/master/docs/api.md#post-v1accountlogin
?
- if it is possible - what I am doing wrong?
- if it is not possible - what are other ways? (except FxA OAuth)

P.S. I create test application to give an idea what I am doing:
https://github.com/oleksandrkyetov/test-app-server

Thanks in advance,
Alex K.
_______________________________________________
dev-media mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-media

Reply via email to