Simplify user authentication and secure access from anywhere with customizable prompts and temporary links.
Project description
PromptLink
Simplify user authentication and secure access from anywhere with temporary links.
PromptLink is a Python package that allows you to streamline user authentication and enable secure access to your application from anywhere. It provides a seamless way to generate temporary links for user authentication, without relying on specific web frameworks. A Google Cloud Function is set up to ensure a secure temporary link for authentication.
Key Features
- Easy and secure: Generate secure temporary links to enable easy secure access from anywhere.
- Versatile Integration: Works across various application types, not limited to web applications.
Installation
You can install PromptLink using pip:
pip install promptlink
Alternatively, if you are using Poetry (recommended), you can install it as follows:
poetry add promptlink
Usage
Here's a basic example of using PromptLink:
from promptlink import Authenticator
with Authenticator(send_link_callback=lambda l: print(f"URL: {l}")) as authenticator:
# The code in this block is executed after the link has been accessed
# in order to avoid authentication timeouts
print("Setting up authentication...")
authenticator.authenticate(lambda s: s == "12345678")
# Below statements will be reached after '12345678' was input on the webpage prompt
print("Finished")
GCP permission requirements
The following permissions are needed for this library:
- Permissions to create Storage buckets and objects
- Permissions to set up a Pub/Sub topic and subscriptions
- Permissions to deploy a Cloud Function
The library will attempt to use the default service account. Any resources created will be named 'promptlink-' followed by a random UUID, so that collision with existing resources is extremely unlikely.
License
This project is licensed under the MIT License. See the LICENSE file for details.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file promptlink-0.1.5.tar.gz
.
File metadata
- Download URL: promptlink-0.1.5.tar.gz
- Upload date:
- Size: 24.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.2 CPython/3.8.10 Linux/5.15.0-86-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ed7ec1ca892bafa240814a6f6d523a4f5dd0a93e63952cf43024e8a0e7f9a8d5 |
|
MD5 | 9c102becc47b0b1590881bae34aae207 |
|
BLAKE2b-256 | 3ce84896bd88f4fb5af4bb5b413e2fae6794217303c3c8595c3739672f3a8e45 |
File details
Details for the file promptlink-0.1.5-py3-none-any.whl
.
File metadata
- Download URL: promptlink-0.1.5-py3-none-any.whl
- Upload date:
- Size: 23.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.2 CPython/3.8.10 Linux/5.15.0-86-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 258315c520a989880ffa9ab3f3a9864e68df9348b4010151968e69919dadf089 |
|
MD5 | ecbfe351fa0c3acb97b2ebc38a64c0d2 |
|
BLAKE2b-256 | 57222b1f4cb831321484b74933773ed24a06220a4c7a291d5281ec4d5ea1e41d |