bugfix: langflow application losing store api-key on refresh page/backend (#2960)
* changing api key journey * refactor(api_key.py): remove unnecessary code related to config_dir and secret_key_path refactor(login.py): refactor setting api_key cookie to use user's store_api_key refactor(variable/service.py): re-encrypt stored value if secret_key changes to ensure validity * 📝 (api_key.py): Remove unused imports and clean up code for better readability 📝 (login.py): Remove unused imports and clean up code for better readability 📝 (auth/utils.py): Remove unused imports and clean up code for better readability 📝 (store/service.py): Remove unused imports and clean up code for better readability * 🔧 (utils.py): replace hashing logic with random key generation for key length less than 32 bytes to ensure key length is always 32 bytes 📝 (utils.py): update comments for clarity and accuracy regarding key generation and encryption process --------- Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
This commit is contained in:
parent
55693c920d
commit
b6774cf3d8
3 changed files with 44 additions and 2 deletions
|
|
@ -117,7 +117,6 @@ export function AuthProvider({ children }): React.ReactElement {
|
|||
}
|
||||
|
||||
function storeApiKey(apikey: string) {
|
||||
cookies.set(LANGFLOW_API_TOKEN, apikey, { path: "/" });
|
||||
setApiKey(apikey);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue