question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Plugin backstage-plugin-github-pull-requests not persisting session on refresh

See original GitHub issue

Expected Behavior

Session should persist on refresh of the page and not prompt login.

Current Behavior

Github login is prompted upon opening the plugin. After login, refreshing the page does not persist authentication session, and prompts for another login. Navigation to different pages in the app persists the session.

Steps to Reproduce

  1. Install backstage-plugin-github-pull-requests.
  2. Follow Github Auth setup as noted here.
  3. Follow implementation instructions as noted here:
// packages/app/src/components/catalog/EntityPage.tsx
import { EntityGithubPullRequestsContent } from '@roadiehq/backstage-plugin-github-pull-requests';
...

const serviceEntityPage = (
  <EntityLayout>
    ...
    <EntityLayout.Route path="/pull-requests" title="Pull Requests">
      <EntityGithubPullRequestsContent />
    </EntityLayout.Route>
    ...
  </EntityLayout>
  1. Navigate to the page, get prompted for authentication by github.
  2. Successfully see pull request plugin rendered after login.
  3. Refresh the page, prompting login again.

Context

I also implemented Github login as a test, and had no issues with persisting the auth session on refresh. Wanted to eliminate the possibility that this was by design first.

Your Environment

  • @backstage/plugin-catalog-react version: 0.6.11
  • @backstage/integration version: ^0.7.1
  • @roadiehq/backstage-plugin-github-pull-requests version: 1.3.3

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
kissmikijrcommented, Feb 3, 2022

A fix got merged to backstage/backstage master for this issue. I’ll close this ticket

1reaction
kissmikijrcommented, Jan 20, 2022

Yes I can repro with the Github App, however, I don’t think the issue is in this plugin, we just use the auth tokens from the core backstage backend. If you go to settings->authentication providers you can see that the whole application is going to be logged out of github after a refresh. I’ll check to make sure, but I think we will need to fix this somewhere else than in this plugin.

Read more comments on GitHub >

github_iconTop Results From Across the Web

github auth diff between OAuth App vs Github App · Issue #9163
If you use a github OAuth App it will persist your session, ... The OAuth apps do not support refresh, so we therefore...
Read more >
Rails Session not persisting after browser refresh
I only want the session to expire when the browser closes and not on refresh.. My session_store.rb. Rails.application.config.session_store : ...
Read more >
Woocommerce session cookie causes Cache BYPASS
I am working on a test site with absolutely minimal plugin deployment (WP + WC ... OR dump all browser cache (cookies included),...
Read more >
Manage Session Cookies | Firebase Authentication
Firebase Auth provides server-side session cookie management for traditional ... As httpOnly cookies are to be used, do not persist any state client...
Read more >
Why isn't my session state working in ASP.NET Core? Session ...
In this post I describe why session state appears to not work in ASP. ... GetString(key) is an extension method in the Microsoft.AspNetCore....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found