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.

feat: Support other strategies

See original GitHub issue

Does graphql-passport also supports other strategies like say passport-azure-ad with its BearerStrategy?`

The documentation only mentions GraphQLLocalStrategy , that’s why it’s unclear to me.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:5

github_iconTop GitHub Comments

2reactions
gforgecommented, Aug 31, 2020

This should be doable but I’ve never worked with the more advanced strategies. The GraphQLLocalStrategy is implemented but it would be awesome if all of the strategies passport provides could be available.

1reaction
jkettmanncommented, Jan 6, 2021

Hey @DarkLite1, @PacomeRivier. Sorry for keeping you wait. The biggest pain that graphql-passport solves is local authentication with email and password. That’s what the GraphQLLocalStrategy is for. Other strategies can be used in the normal way with passport.

If you’re looking for an example you can see this blog post. Here is the final repository that combines the Facebook Strategy with local email/password.

If you don’t use local email/password to authenticate the only thing you might use from this package is the buildContext function as you can see here. This basically just copies some of the passport functions like authenticate, login, logout and so on into the GraphQL context. So you might not necessarily need to use this package if you don’t use local email/password.

Read more comments on GitHub >

github_iconTop Results From Across the Web

10 Strategies To Build A Successful Cross-Functional Team
Cross functional teams maximize operational efficiency and productivity. Learn 10 strategies for building and managing a strong cross functional team.
Read more >
The Secret to a Great Planning Process - First Round Review
Planning is hard because it's inherently different from other exercises your ... Developing execution plans that support the high-level strategy.
Read more >
Operations Strategies 101 and 201 - Smartsheet
Discover the basics of operations strategies and how to write a strategic operations plan. Get pro insights on what the future might hold....
Read more >
8 Best Customer Retention Strategies Your Business Should ...
Find out what are the Best Customer Retention Strategies Your Business Should Use in order to keep your customers more engaged.
Read more >
4 Self-Care Strategies to Support Students
2. Pause for Mental Breaks. Another small way O'Brien-Richardson brings health and well-being into her classroom is by providing space for ...
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