Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature]: Change user time to logout #4230

Open
1 of 8 tasks
sm1thana opened this issue Feb 10, 2024 · 11 comments · May be fixed by #4260
Open
1 of 8 tasks

[feature]: Change user time to logout #4230

sm1thana opened this issue Feb 10, 2024 · 11 comments · May be fixed by #4260
Assignees
Labels

Comments

@sm1thana
Copy link

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
  • peregrine
  • pwa-devdocs
  • upward-js
  • upward-spec
  • create-pwa
@sm1thana sm1thana added the enhancement New feature or request label Feb 10, 2024
Copy link

m2-assistant bot commented Feb 10, 2024

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.

@glo11372 glo11372 self-assigned this Apr 23, 2024
@glo11372
Copy link
Collaborator

glo11372 commented Apr 25, 2024

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

@glo42707
Copy link
Contributor

glo42707 commented May 2, 2024

@adobe export jira

@glo11372
Copy link
Collaborator

glo11372 commented May 3, 2024

@adobe export issue to Jira project PWA

@github-jira-sync-bot
Copy link

❌ You don't have permission to export this issue.

@glo82145
Copy link
Collaborator

glo82145 commented May 6, 2024

@adobe export issue to Jira project PWA

@github-jira-sync-bot
Copy link

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

@glo11372
Copy link
Collaborator

glo11372 commented May 8, 2024

@adobe export issue to Jira project PWA

@github-jira-sync-bot
Copy link

❌ You don't have permission to export this issue.

@glo11372
Copy link
Collaborator

glo11372 commented May 8, 2024

@adobe export issue to Jira project PWA

@github-jira-sync-bot
Copy link

❌ You don't have permission to export this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants