pwa-studio
pwa-studio copied to clipboard
[feature]: Change user time to logout
Is your feature request related to a problem? Please describe. The user becomes unauthorized after 1 hour. I'd like to change this time.
Describe the solution you'd like @magento/peregrine/lib/store/actions/user/asyncActions.js has a setToken function that sets ttl time to 3600.
export const setToken = token =>
async function thunk(...args) {
const [dispatch] = args;
// Store token in local storage.
// TODO: Get correct token expire time from API
storage.setItem('signin_token', token, 3600);
// Persist in store
dispatch(actions.setToken(token));
};
I'd like to change this time, but I can't extend this file or function. I read this manual, but didn't find any helpful information https://developer.adobe.com/commerce/pwa-studio/guides/general-concepts/extensibility/
I thought I could extend this file like a talon:
const peregrineTargets = targets.of('@magento/peregrine');
const talonsTarget = peregrineTargets.talons;
and get a store param from peregrineTargets, but it has only talons and hooks fields.
So, could you be so kind to help me, to change this param?
Please let us know what packages this feature is in regards to:
- [ ]
venia-concept
- [ ]
venia-ui
- [ ]
pwa-buildpack
- [x]
peregrine
- [ ]
pwa-devdocs
- [ ]
upward-js
- [ ]
upward-spec
- [ ]
create-pwa
Hi @sm1thana. Thank you for your report.
To speed up processing of this issue, make sure that you provided sufficient information.
Add a comment to assign the issue: @magento I am working on this
Join Magento Community Engineering Slack and ask your questions in #github channel.
Hi @sm1thana As this is enhancement ,We will start working on this ticket. Thank You
@adobe export jira
@adobe export issue to Jira project PWA
:x: You don't have permission to export this issue.
@adobe export issue to Jira project PWA
:white_check_mark: Jira issue https://jira.corp.adobe.com/browse/PWA-3263 is successfully created for this GitHub issue.
@adobe export issue to Jira project PWA
:x: You don't have permission to export this issue.
@adobe export issue to Jira project PWA
:x: You don't have permission to export this issue.