How to create login session in cmd via username and password on web form - authentication

I want to create a console application similar to Heroku / Google cloud CLI tool that routs the user to the default web login form. Once the user is validated on the browser the session is passes to the CMD terminal. How does it work ? In the below screenshot i used heroku cli , when i type heroku login I am presented with a browser form.

Related

Reset password for https://dev.azure.com/

I'm trying to login to DevOps via a Microsoft Power App to load my application. All of a sudden my login credentials stopped working. Is there a way to reset the password to access my repo?
https://dev.azure.com/stexxxxx/_git/DCxxx

Nextcloud - Automatically login the user via link

I use the nextcloud API in my app. I use it to create the user accounts on nextcloud, for example. The users registers in my app and should not have to create their own Nextcloud password (my app does that for them).
Now I want to send the user to the Nextcloud page via a link. Can I create the link so that the user is automatically signed in? So e.g. if I pass a token via URL parameter?
Example:
https://myprivatenextcloud.com/...?user=user1&pwtoken=02jw9dj0w9djw02ejf0j0s9d2sldfk

Bypass user login (VB.Net)

I have this application (Windows Form App) that require user to enter their Username and Password. Inside this application, there are shortcut for website and each of the website also require user to login first before they can use the website. But I want to bypass user when they click the shortcut for the website (if they already login for the application) where the login page will skipped and redirect user to the mainpage of the website. User will only required to login if they are accessing the website without using the application.
I used Process.Start() to run the website when the website shortcut is clicked. It open the website but redirect user to the login page. How do I bypass user credentials so that they will be able to login once (through the application) and can access all the website without do login again?
Edit : Is it possible if I use session inside my website login coding to redirect user to the main page? So it's like, when user login using the application, the website will automatically detect that the user already login, so user will be redirected to the main page of the website without going through the login page.
Give your user an API key that is stored in the user database table that is unique that changes when they login. Then in VB use Process.Start("https://example.com/login.php?api_key=" + 'add api_key retrieved from database on login) then in your PHP you check for the api_key as a login that will create the session for the logged in user.

How to achieve "Remember Me" functionality for both local and remote login pages?

I have a requirement in my application for iOS and Android, developed using IBM Worklight, to remember the user ID if the user selected this option.
I can achieve this by using localStorage, but the issue is that I have two login pages:
One is placed within the application, and the
Second is hosted on a remote server
Depending on the conditions the application will meet, either the remote login page will be displayed or the local login page will be displayed.
If I use localStorage on local page it is not accessible for server side login page. So I want to use some storage/file on the mobile to store my user id which is accessible for both local and server login page. Is this is possible using worklight/phonegap storage?
More explanation:
Remote login page is hosted on some www.xxx.com domain. My requirement is on launch of application the local login page is shown to the user, there user can enter user id and password and selects remember me option and submits form. Then user logs in and navigated to some xxx.com/yyy server page. From there when user clicks on log out it navigates to remote login page which is hosted on www.xxx.com server. As user already checked remember me option in local page the remote login page has to pre populate the user id text box. And same scenario should happen when user enters credentials in remote login page and selects remember me check box. So when user kills the application from background and relaunches the application user will get local login page where I need to pre populate the user id last time he entered.
Short answer: in my opinion, no.
Longer answer: I will explain what I think using your scenario:
Remote login page is hosted on some www.xxx.com domain. My requirement
is on launch of application the local login page is shown to the user,
there user can enter user id and password and selects remember me
option and submits form.
So far so good. You can store it in either Web Storage or JSONStore or use Cordova File API. Catch: all of these are available ONLY for the specific application.
Then user logs in and navigated to some xxx.com/yyy server page. From
there when user clicks on log out it navigates to remote login page
which is hosted on www.xxx.com server. As user already checked
remember me option in local page the remote login page has to pre
populate the user id text box.
Still plausible. Lets say the user selected 'Remember Me', so you can adjust the URL pointing to the remote login page and send with it as parameters the username and password. Assuming that there will a mechanism to handle those on the remote page.
This does not come for free, though.
This is not meant to work out-of-the-box. It's worth noting that whether Web Storage (localStorage...) is used or any other type of storage- the application and the Cordova InAppBrowser do not share the same localStorage, and the same is true if you open a new WebView.
And same scenario should happen when user enters credentials in remote
login page and selects remember me check box. So when user kills the
application from background and relaunches the application user will
get local login page where I need to pre populate the user id last
time he entered.
This is also a problem IMO, because any application is sandboxed - be it the browser app or the Worklight app, each of them is sandboxed. so you can't just go to website X, and create some localStorage for it and expect that data to be available for another WebView belonging to another app. That's the whole point of sandboxing, in order to protect the app.
And in this case, where the remote "page" will save the data, only Web Storage is available anyway, as JSONStore requires the Worklight API, which is not available when you load external websites.
Notes:
Since you want to save both username and password, you'd probably want to encrypt them in some way, so JSONStore and WL.EncryptedCache are your options, rather than plain Web Storage.

How can a web user be authenticated through their machine without providing a username and password?

I'm wondering how I can authenticate a user through their device, so they don't have to provide a username and password?
For example I'm on an Android tablet and I connect to www.mysite.com (which is an asp.net site). I want the web browser to submit something to www.mysite.com to handle the authentication so the user doesn't have to put in a username and password and can only use the service from the device.
For our use case we were able to control the url passed to the server. To initiate the process we have the user login once and we generate a guid to be appended to the url when they initially hit our site. When they hit our site with a guid and aren't logged in, we log them in.