Open carloska opened 6 years ago
I will have a look into this and get back to you. I think is possible to do and if it is I will implement into the component 👍
I will have a look into this and get back to you. I think is possible to do and if it is I will implement into the component 👍
I found a possible way: Im getting an access token from window.IN.ENV.auth.oauth_token I put this token into response and send it back to callback, from there send is back to backend, and the LinkedIn rest api worked with access token attached to url as parameter "oauth_token". I don
t know if is this a good way, but it`s working, and the token expires after a time.
It would be also a good improvement the ability to define the complete render node instead of the default. For example if I want to use a link instead of a button, or I want to use my component button, with a logo inside, or something else. For example at my facebook component: render={renderProps => (
)}
@carloska I recently worked with Linked In sign in feature. I did consider your solution before (send oauth_token
from window.IN.ENV.auth.oauth_token
to server, and server validate one more time) but it is not documented anywhere, so I can not know they will support it in the future.
So I solved this problem by following this link Authenticating with OAuth 2.0. I did wrapped it into a package. If you are still interested, take a look at my repo https://github.com/nvh95/react-linkedin-login-oauth2
@carloska Awesome, I like the idea of a custom component! I will see if I implement this option this week with the oauth_token
included too.
I am also trying to get the access token. but I get: Cannot read property 'isAuthorized' of undefined seems that
handleAuthorization = e => { if (window.IN.User.isAuthorized()) { return window.IN.User.logout(this.callBack, '') } return window.IN.User.authorize(this.callBack, '') }
is where this happens
I will have a look to do and let you know what I get.
I want to ask if there is any way to ask for linkedIn access token with help of this component? My login procedure should be in this way:
This procedure is implemented at Facebook login, the same way I want also at LinkedIn
thanks a lot.