I have dummy username and pasword to enter in linkedin. From an asp.net application, when the button is clicked i need to login automatically used the username and password in linkedIn.
How to do that?
Thanks
A direct (server to server) login is not possible. It wouldn't be nice to ask your users for their LinkedIn account and password.
You can implement OAuth between you (consumer) and LinkedIn (provider) and let the user log directly to LinkedIn. More info about this on:
http://developer.linkedin.com/docs/DOC-1008
By loading your destination URl into a Web-browser element and being redirected, .net would allow handling of the body html and auto click of the login for this.
Alternatively you can pass the header value with the request that would pass through auth - should last 2 days a time I believe.
Related
I am trying to achieve auto login with given credentials in the back while users can directly see a logged in web page so that they don't need to type or know the credentials. Is there a way to do this without any credentials show up in the URL from user's side?
If you only have a link to work with, this is not possible.
Can i log in to my Facebook account (Knowing user id and password), in the server using Facebook php-sdk, and without need to click any URL?
If yes, please explain.
It is against Facebook's Terms of Service to use a user's email address and password to login to their account. You should instead use the Facebook API to achieve this, but it requires manual login by a user.
There are ways of achieving automatic login using credentials, but since it's not allowed, I won't go into detail. Facebook also detects and prevents most of the common method of auto-login.
I need to refresh the user linkedin access token without them having to go through the initial authorization process all over again. I have also looked at this documentation http://developer.linkedin.com/documents/exchange-jsapi-tokens-rest-api-oauth-tokens, but It doesn't work because my users authorize the app through regular OAuth and the article uses the JS OAuth. (Not sure, if there is a difference between two processes, and if there is a difference between access tokens received from each process). Even though, I'm already logged in another tab on the same browser,
it always prompts me to login to LinkedIn.
If I try IN.User.isAuthorized() it returns false though I'm logged in into LinkedIn and I can't seem to be able to refresh the token.
If I pass the user LinkedIn access token from my server to the JS and the user LinkedIn id IN.User.isAuthorized() always returns true even when I'm not logged in
So what I'm trying to ask is, is there a way to refresh the user linkedin oauth token thorguh JS when the user is logged in to linkedin on the same broswer like we are able do for facebook ? and what is it ?
You cannot refresh the token without the member being at your application.
If you want to refresh the token, the member needs to be there and you need to direct them through the authorization page. If they're signed in to LinkedIn, this will be a seamless refresh and we'll redirect page to your application.
I have one situation. I create a website. Then I put a tab that will link to Facebook authorization login page. Can I pass login parameter(Email,Password) to the Facebook authorization login page?? So that the user can authorize the application without see the authorization login page.
Thanks.
No. You can't do that. It would require the user to give you their facebook password which obviously would be breaking all kinds of terms and conditions. This is what OAuth is for. Check out the documentation on authentication
I have code examples from some of my previous work that help me to post form values to a web page (login credentials) and retrieve the text from that page. Now I want to pass in form values (login credentials again) but actually open that web page in a browser given those credentials.
How do I do that? I'm not doing anything nefarious. In our CRM app (home-grown as it is), I want to create a link button that opens our web site's protected products page given the user's credentials (based on the user's login credentials). Normally, I'd copy the user's credentials in our login page which then takes me to the products page. I'm trying to do this now by just clicking a link button.
Any suggestions?
How are you launching the browser? Is this an internal network app? If so, I would recommend using Windows Authentication for your ASP.NET app, and then you don't have to worry about passing credentials. If you can't do that, then you'll probably have to pass the credentials on the querystring generated by your CRM app. Obviously, this is a huge security risk. But the next step would be to perform your internal authentication and then call FormsAuthencation.RedirectFromLoginPage or FormsAuthentication.SetAuthCookie().