pwa-studio icon indicating copy to clipboard operation
pwa-studio copied to clipboard

[feature]: Change user time to logout

Open sm1thana opened this issue 1 year ago • 11 comments

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

sm1thana avatar Feb 10 '24 08:02 sm1thana

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.

m2-assistant[bot] avatar Feb 10 '24 08:02 m2-assistant[bot]

Hi @sm1thana As this is enhancement ,We will start working on this ticket. Thank You

glo11372 avatar Apr 25 '24 02:04 glo11372

@adobe export jira

glo42707 avatar May 02 '24 05:05 glo42707

@adobe export issue to Jira project PWA

glo11372 avatar May 03 '24 08:05 glo11372

:x: You don't have permission to export this issue.

github-jira-sync-bot avatar May 03 '24 08:05 github-jira-sync-bot

@adobe export issue to Jira project PWA

glo82145 avatar May 06 '24 05:05 glo82145

:white_check_mark: Jira issue https://jira.corp.adobe.com/browse/PWA-3263 is successfully created for this GitHub issue.

github-jira-sync-bot avatar May 06 '24 05:05 github-jira-sync-bot

@adobe export issue to Jira project PWA

glo11372 avatar May 08 '24 10:05 glo11372

:x: You don't have permission to export this issue.

github-jira-sync-bot avatar May 08 '24 10:05 github-jira-sync-bot

@adobe export issue to Jira project PWA

glo11372 avatar May 08 '24 10:05 glo11372

:x: You don't have permission to export this issue.

github-jira-sync-bot avatar May 08 '24 10:05 github-jira-sync-bot