@absolutejs/auth 0.7.4 → 0.7.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -126,6 +126,12 @@ var isOIDCProviderOption = (option) => {
126
126
  const provider = providers[option];
127
127
  return provider.isOIDC;
128
128
  };
129
+ var isScopeRequiredProviderOption = (option) => {
130
+ if (!isValidProviderOption(option))
131
+ return false;
132
+ const provider = providers[option];
133
+ return provider.scopeRequired;
134
+ };
129
135
  var isRefreshableOAuth2Client = (providerName, client) => isRefreshableProviderOption(providerName);
130
136
  var isRevocableOAuth2Client = (providerName, client) => isRevocableProviderOption(providerName);
131
137
  var hasClientSecret = (credentials) => {
@@ -1385,6 +1391,8 @@ var providerOptions = Object.keys(providers).filter(isValidProviderOption);
1385
1391
  var refreshableProviderOptions = Object.keys(providers).filter(isRefreshableProviderOption);
1386
1392
  var oidcProviderOptions = Object.keys(providers).filter(isOIDCProviderOption);
1387
1393
  var revocableProviderOptions = Object.keys(providers).filter(isRevocableProviderOption);
1394
+ var scopeRequiredProviderOptions = Object.keys(providers).filter(isScopeRequiredProviderOption);
1395
+ var pkceProviderOptions = Object.keys(providers).filter(isPKCEProviderOption);
1388
1396
  var createOAuth2Client = (providerName, config) => {
1389
1397
  const meta = providers[providerName];
1390
1398
  const isConfigPropertyFunction = (cfgProp) => typeof cfgProp === "function";
@@ -2053,7 +2061,12 @@ var absoluteAuth = ({
2053
2061
  })).use(protectRoute()).as("plugin");
2054
2062
  };
2055
2063
  export {
2064
+ scopeRequiredProviderOptions,
2065
+ revocableProviderOptions,
2066
+ refreshableProviderOptions,
2056
2067
  providerOptions,
2068
+ pkceProviderOptions,
2069
+ oidcProviderOptions,
2057
2070
  isValidProviderOption,
2058
2071
  isRevocableProviderOption,
2059
2072
  isRevocableOAuth2Client,
@@ -185,4 +185,4 @@ export declare const absoluteAuth: <UserType>({ providersConfiguration, authoriz
185
185
  export * from './types';
186
186
  export * from './utils';
187
187
  export type { OAuth2TokenResponse, OAuth2Client, ProviderOption, PKCEProvider, OIDCProvider, RefreshableProvider, RevocableProvider, ScopeRequiredProvider, CredentialsFor } from 'citra';
188
- export { providerOptions, isValidProviderOption, isRefreshableOAuth2Client, isRefreshableProviderOption, isOIDCProviderOption, isPKCEProviderOption, isRevocableProviderOption, isRevocableOAuth2Client } from 'citra';
188
+ export { providerOptions, refreshableProviderOptions, revocableProviderOptions, oidcProviderOptions, pkceProviderOptions, scopeRequiredProviderOptions, isValidProviderOption, isRefreshableOAuth2Client, isRefreshableProviderOption, isOIDCProviderOption, isPKCEProviderOption, isRevocableProviderOption, isRevocableOAuth2Client } from 'citra';
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.7.4",
2
+ "version": "0.7.5",
3
3
  "name": "@absolutejs/auth",
4
4
  "description": "An authorization library for absolutejs",
5
5
  "repository": {
@@ -33,7 +33,7 @@
33
33
  "elysia": ">= 1.2.0"
34
34
  },
35
35
  "dependencies": {
36
- "citra": "0.19.0"
36
+ "citra": "0.20.1"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@absolutejs/absolute": "0.4.0",