panva / oauth4webapi

OAuth 2 / OpenID Connect for JavaScript Runtimes

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Allow custom discovery location?

MFinn87 opened this issue · comments

commented

What happened?

First of all, really awesome work making oauth4webapi and node-openid-client.

I'm not sure whether to label this a feature request or bug.

I'm running into an issue when sending a discovery request to the url:
https://developer.api.intuit.com/.well-known/openid_sandbox_configuration

You'll notice that oauth4webapi is appending its own ...well-known... url portion, so it appears in duplicate:

1B7F7D97-2497-4094-9DBC-7E99101FA4A3

It looks like you may have solved this in node-openid-client in this commit: panva/node-openid-client@0c8a8f2

I realize that is a different repo, but these projects do solve a lot of the same problems and I was wondering if you'd be willing to apply the same/similar fix to this repo?

Thanks,
Mike

Version

v2.2.1

Runtime

Deno

Runtime Details

deno:v1.32.4

Code to reproduce

import { discoveryRequest } from 'https://deno.land/x/oauth4webapi@v2.2.1/mod.ts'


const url = new URL('https://developer.api.intuit.com/.well-known/openid_sandbox_configuration')

const response = await discoveryRequest(url)

console.log(response)


### Required

- [X] I have searched the issues tracker and discussions for similar topics and couldn't find anything related.
- [X] I agree to follow this project's [Code of Conduct](https://github.com/panva/oauth4webapi/blob/main/CODE_OF_CONDUCT.md)

You should just perform your own fetch request to obtain a Response and pass that to processDiscoveryResponse if you want to work with arbitrary discovery URLs.

commented

Can do. Thank you.