Closed speedfl closed 7 years ago
Can you elaborate what you mean by: "We would nees inapp browser no like on the satellizer project"
@royipressburger can you help?
sorry it is a typo because of my phone
In fact I would like to know if we would need the cordova plugin inapp browser like in satellizer.
To be honnest I never used satellizer. I am working on Ionic 2 so when I saw your project I run on it and started trying to understand. I followed the complete flow but facebook is not called when I am running ionic serve
So basically what I did:
Clone the repo. Did npm install on the ionic folder
Some changes as in fact there is only the basic login
ng2-ui-auth-example\ionic2\src\pages\login\login.html => <button ion-button (click)="signup()">Signup
ng2-ui-auth-example\ionic2\src\pages\signup\signup.html => <button ion-button (click)="signup('facebook')">Login facebook
g2-ui-auth-example\ionic2\src\pages\signup\signup.ts =>
signup(provider){
console.debug('launch signup');
this.auth.authenticate(provider);
}
So Working with ionic serve. Just to know if it we need to use the inapp browser and how to use it of cordova :)
Hi @speedfl, if you use this library you will the in app browser. The steps to work with facebook:
http://localhost/
NOTE that the /
at the end is mandatorycordova-inappbrowser
http://localhost/
Hope this helps
Thx I will try to follow your explanation
Euh just another question. I did a java auth server using jaxrs (based on the example provided by satellizer with some changes to map my need) However I am getting error. Unrecognized field 'url' not marked as ignorable It is due to the fact that I am receiving in my request a field called url and I am trying to map in an object which does not contain it. Could you please tell me where I can find the full content of the request sent to the server for facebook login ?
The request you are talking about is from the ui to your server after the authentication with Facebook?
So you can close the issue :) sorry for the inconveniance
What is sent is:
{ "name": "facebook", "url": "/auth/facebook", "authorizationEndpoint": "https://www.facebook.com/v2.5/dialog/oauth", "redirectUri": "http://localhost:8100/", "requiredUrlParams": [ "display", "scope" ], "scope": [ "email" ], "scopeDelimiter": ",", "display": "popup", "oauthType": "2.0", "popupOptions": { "width": 580, "height": 400 }, "clientId": "CLIENT_ID", "defaultUrlParams": [ "response_type", "client_id", "redirecturi" ], "responseType": "code", "responseParams": { "code": "code", "clientId": "clientId", "redirectUri": "redirectUri" }, "code": "THE CODE HERE", "": "_" }
I finally understood what is happening. I made a fix. If you want to have an example using jaxrs for the server don't hesitate to ask me :)
Cool.. good luck
Thanks @royipressburger
@royipressburger I would just have a little question. I installed the inappbrowser and it seems to be launched
However I am getting issue: The redirect_uri is not supported
If I am looking at the redirect_uri sent I am getting : redirect_uri=file:///
The issue only occures when I am connecting on my device. On browser with ionic serve everything is working.
Is there specific things to do?
@speedfl Did you extend the CustomConfig
and changed to redirect_uri?
export class MyConfig extends CustomConfig {
providers = {
facebook: {
clientId: CONFIG.FACEBOOK_KEY,
scope: CONFIG.FACEBOOK_PERMISSION,
redirectUri: 'http://localhost/'
}
};
}
Hello Sorry I thought I had to put it only on the Facebook developer page (on my app) I will try,
Thanks a lot :)
I will keep you posted.
works!! Thanks a lot!
@speedfl any time bro!! good luck
Hello.
First of all thanks a lot for your updates on this project and for the example you created. Howevet I have small questions about ionic :
Thanks for your answer