metakgp / iitkgp-erp-login-pypi

The only python package you will ever need to implement login process in ERP for IIT-KGP
https://pypi.org/project/iitkgp-erp-login/
GNU Affero General Public License v3.0
26 stars 7 forks source link

Can there be a default login workflow for WebApps? #15

Closed proffapt closed 1 month ago

proffapt commented 11 months ago

Idea

A default workflow of login in case of webapps integrated into the currently existing login() function. Currently the workflow for webapps is broken into various steps through functions, basically like below:

image

What I want is a one liner to implement all of this from developer's perspective. Break the workflow in 3-4 endpoints (as to-and-fro data passing is required). Implement those endpoints with proper error handling so that whichever frontend implements them can have proper logs.

Version

If done it will be v2.4.0.

Devansh-bit commented 8 months ago

How will this be implemented? Since the login flow cannot be completed in a single request due to the question, there needs to be tight integration between the client and the server. A redirect can be built for the oneliner but that takes away the customization for the developer. Am I missing something?

proffapt commented 8 months ago

A redirect can be built for the oneliner

What exactly?

Devansh-bit commented 8 months ago

The API endpoint redirects the user to a page that lives in the library, which completes the login and then directs the user back to the main application

proffapt commented 8 months ago

hmm, no, that will really take away freedom from the developer

Devansh-bit commented 8 months ago

Yeah, so how are we supposed to make it work then?

proffapt commented 8 months ago

That's the question XD.. It has a question tag..

proffapt commented 4 months ago

Temporarily closing this issue.

tanush-128 commented 1 month ago

I would like to work on it