WinJS Windows 8/10 app with OAuth login

78 views
Skip to first unread message

Jason Jarrett

unread,
Nov 28, 2015, 10:57:01 AM11/28/15
to Firebase Google Group

Hey All,

Are there any examples of how to integrate OAuth providers in a WinJS Windows 8 or 10 application?

When I try to call the native Firebase auth method within the app I get the following error info.

   code: "TRANSPORT_UNAVAILABLE",
   description: "TRANSPORT_UNAVAILABLE",
   message: "TRANSPORT_UNAVAILABLE",
   name: "Error",


I found a project that appears to integrate FB auth with a WinJS project: https://github.com/Thuzi/facebook-winjs-sdk

If you can't answer the first question (any examples of how to do it). Can you provide any guidance on how to integrate the above project with the firebase api? Wondering if I can auth outside of Firebase and pass it through?

Appreciate any thoughts, Thanks.
Jason

Kato Richardson

unread,
Nov 28, 2015, 10:58:06 AM11/28/15
to Firebase Google Group
Which auth method did you try and did you also try the other ones?

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/b7becb2b-42f4-4954-9564-5789446d7b90%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jason Jarrett

unread,
Nov 28, 2015, 12:41:08 PM11/28/15
to Firebase Google Group
I was using authWithOAuthPopup.

With the facebook-winjs-sdk I did get a prototype working using authWithOAuthToken but the prototype only supports facebook. Looks like we need to wrap the OAuth calls and use Windows.Security.Authentication.Web.WebAuthenticationBroker.authenticateAsync and implement each manually...

Has anyone at firebase already gone though this exercise and are there any properly wrapped samples or OSS libs to work with?

Thanks,

Kato Richardson

unread,
Nov 30, 2015, 10:49:27 AM11/30/15
to Firebase Google Group
Any success using authWithOAuthRedirect()? If it's not a hassle, I'd like to hear how that went as well. I'm guessing it's window.open that's not available, so I'd expect better results.



Jason Jarrett

unread,
Nov 30, 2015, 3:57:55 PM11/30/15
to fireba...@googlegroups.com
Hey Kato,

I went ahead and changed my app to use `ms-appx-web://` instead of "ms-appx://" which makes it work in a web context. This allowed it to work properly for me without any winjs sdk stuff.

but before I went that route I prototyped it and got a working example.

The trick is to look here: https://github.com/Thuzi/facebook-winjs-sdk-sample/blob/master/src/facebook-winjs-sdk-sample/winjs-scrumptious/js/main.js#L204-L248 *using the Windows.Security.Authentication.Web.WebAuthenticationBroker.authenticateAsync...

Then use the token received and pass it to firebase authWithOAuthToken.

I don't know how far I will go with the Win8 work - may just use the web context going forward...

Hope this helps
 

--
You received this message because you are subscribed to a topic in the Google Groups "Firebase Google Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/firebase-talk/7t_AHzVp-gg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to firebase-tal...@googlegroups.com.

To post to this group, send email to fireba...@googlegroups.com.

Kato Richardson

unread,
Nov 30, 2015, 5:06:32 PM11/30/15
to Firebase Google Group
Thanks, Jason! That's quite helpful and should be useful to others working on Win apps.

Reply all
Reply to author
Forward
0 new messages