Skip to content

Commit

Permalink
Included decode token #44
Browse files Browse the repository at this point in the history
  • Loading branch information
raghunandanarava committed Jun 7, 2022
1 parent 1e2b88a commit fa58daf
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
9 changes: 7 additions & 2 deletions src/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,16 @@ import { AppController } from './app.controller';
import { ConfigModule } from '@nestjs/config';
import { TokenModule } from './token/token.module';
import { DiscoveryModule } from './discovery/discovery.module';
import { TokenModule } from './token/token.module';
import { FlowsModule } from './flows/flows.module';

@Module({
imports: [ConfigModule.forRoot(), UserModule, DiscoveryModule, TokenModule, FlowsModule],
imports: [
ConfigModule.forRoot(),
UserModule,
DiscoveryModule,
TokenModule,
FlowsModule,
],
providers: [AppService],
controllers: [AppController],
})
Expand Down
7 changes: 5 additions & 2 deletions src/flows/flows.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ export class FlowsService {
audience: process.env.AUDIENCE,
},
);

return receivedToken.data.access_token;
return await this.tokenService.decodeToken(
process.env.ISSUER_STRING,
String(issuer.jwks_uri),
String(receivedToken.data.access_token),
);
}
}

0 comments on commit fa58daf

Please sign in to comment.