Comments (8)
Just to confirm, the first snippet does work as expected?
from actions-on-google-java.
Yes, this works:
String accessToken = ((DialogflowRequest)request).getAogRequest().getUser().getAccessToken();
but as it's been discovered via some deep debugging sessions and not really advertised anywhere, I'm cautious about using it as it may break in the future in case of impl change.
And this doesn't work: request.getUser().getIdToken()=null
Should it not return consistent results?
from actions-on-google-java.
Check out the Google Sign In sample in Java but specifically here:
private boolean userIsSignedIn(ActionRequest request) {
String idToken = request.getUser().getIdToken();
LOGGER.info(String.format("Id token: %s", idToken));
if (idToken == null || idToken.isEmpty()) {
return false;
} else {
return true;
}
}
I'm closing this out but if you're still facing issues let us know.
from actions-on-google-java.
@sarahdwyer I saw that, but it doesn't address the issue I'm experiencing
from actions-on-google-java.
Did you set up Account Linking for your project? If so, what configuration did you choose (Google Sign-In, OAuth, etc.)?
from actions-on-google-java.
We did via OAuth's Authorization code flow
from actions-on-google-java.
@slkasisto if you added OAuth, then user info needs to come from your authentication/authorization provider. The access token you get back from request.getUser().getAccessToken()
is the access token to your oauth provider
from actions-on-google-java.
That is understood, however it was not populating.
from actions-on-google-java.
Related Issues (20)
- Allow deserializing a request and serializing a response using streams HOT 5
- Support noInputPrompts HOT 3
- vendored googleapis proto cause duplicate-dependency-class issues
- consider dropping JSONObject from the smarthome API surface HOT 1
- SyncResponse.Payload is missing errorCode
- Smarthome integration should expose DisconnectResponse HOT 3
- report state need a Integer value type HOT 4
- Intermittent error while while calling reportState in Java HOT 1
- Smarthome integration should allow setting arbitrary data on ExecuteResponse HOT 1
- Not able play video from hls direact link into chromecast using google smart home action
- Missing features on java AoG library
- Regarding the 'NOT_FOUND: Requested Entity was not Found' error log
- Exception when the server reports the status
- How to enrich messages with content? HOT 4
- ManagedChannelImpl was not shutdown properly HOT 3
- Support for Actions on Google Console HOT 3
- why there is no field `notificationSupportedByAgent` ? HOT 4
- German umlauts (ä, ö and ü) not properly displayed and spoken. HOT 3
- FATAL EXCEPTION: java.lang.AssertionError getResourceResolver after gradle and kotlin version updated in Android project
- Security Policy violation Binary Artifacts HOT 28
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from actions-on-google-java.