-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(auth-provider): firebase auth provider #90
Conversation
I'm trying to use this code as I would like to use Firebase with nebular, but I keep getting |
@lolsborn were you able to resolve this. |
I have not. I didn't spend any time on it this weekend. Even though the
code I share is probably enough to reproduce it I was thinking about
creating a minimum project that someone can checkout which reproduces the
error. If that sounds useful let me know.
…--
Steven Osborn
http://lolsborn.com
On Mon, Jan 29, 2018 at 8:21 AM, Satya Tanwar ***@***.***> wrote:
@lolsborn <https://github.com/lolsborn> were you able to resolve this.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#90 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AADshDzPjhrePSA-ONWVQQQ7iD1-wfiVks5tPe__gaJpZM4QpzhB>
.
|
The code does works. I just copied parts of it into my project and it worked with minor mods (y) thanks! |
*/ | ||
register(data?: any): Observable<NbAuthResult> { | ||
return Observable.fromPromise(firebase.auth().createUserWithEmailAndPassword(data.email, data.password)) | ||
.map((res) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be flatMap?
otherwise the result is
Observable<NbAuthResult| Obsevable>
} | ||
|
||
private processSuccess(response?: any, redirect?: any, messages?: any): NbAuthResult { | ||
return new NbAuthResult(true, response, redirect, [], messages); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should add the last parameter rawToken, otherwise tokenService ignores this payload and does not store it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
infact, since this doesn't return a JWT. we need to store JSON.stringify(response)
as the rawToken
Hey @Kshitij-Banerjee, thanks for the review, we will be reviewing the changes soon. |
@nnixaa Thanks ! |
No description provided.