Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[Bug]: dnn api tokens persona bar visual issue

Open
#7,009 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 2 days

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
45/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
javascript
Domain
frontend

Research direction

Start by reading utils.dateInPast and the token-status code shown in the issue, then check how the active/expired filter uses that status. Verify behavior with tokens expiring later today and tokens whose expiration times have passed today; done means the displayed status and filter distinguish them by time of day.

Written by the indexing model from the issue text.

Description

Status: New
Is there an existing issue for this?
  • I have searched the existing issues
What happened?

When adding new tokens with expire datetime same day it will allways say Expired. But it is not.
json data from PersonaBar/Security/GetApiTokens is correct but visual status is wrong.

if (utils.dateInPast(new Date(props.apiToken.ExpiresOn), new Date())) { status = resx.get("Expired");

then from utils
dateInPast(firstDate, secondDate) { if (firstDate.setHours(0, 0, 0, 0) <= secondDate.setHours(0, 0, 0, 0))

it only looks at date not time. because <= is used and times are set to midnight.

Steps to reproduce?

Add token that expires later today. it will show as expired.

Also the filter is not working as expected. add more tokens all for today but some in past (time wise) and some later today. use filter for active/expired and you will see wrong results

Current Behavior

wrong status

Expected Behavior

also take time of day into account.

Still testing the other side of the token (auth on api) if token is seen as valid when calling with bearer token
I expect it will.

Relevant log output

Anything else?

No response

Affected Versions

10.2.2 (latest v10 release)

What browsers are you seeing the problem on?

Chrome

Code of Conduct
  • I agree to follow this project's Code of Conduct
Dominant language
C#
Stars
1.1k
Forks
791
Avg merge
2d 8h
Merged PRs (30d)
27

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from dnnsoftware/Dnn.Platform

All issues in dnnsoftware/Dnn.Platform

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.